This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Possible AS bug
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: sreenivas penumarthy <suntronicsus at yahoo dot com>
- Cc: bug-binutils at gnu dot org, binutils at sources dot redhat dot com
- Date: Mon, 4 Aug 2003 21:28:58 +0930
- Subject: Re: Possible AS bug
- References: <20030716194625.88850.qmail@web20511.mail.yahoo.com>
On Wed, Jul 16, 2003 at 12:46:25PM -0700, sreenivas penumarthy wrote:
> cause problems during the execution. So ARPL [%ax],%bx
> compiles and produces: 63 fe. I think it is going to
Yes, this is a bug. The following should fix it.
* config/tc-i386.c (i386_intel_operand): Always call i386_index_check
for memory operands. Pass the full operand_string to i386_index_check.
Index: gas/config/tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.144
diff -u -p -r1.144 tc-i386.c
--- gas/config/tc-i386.c 4 Jul 2003 10:46:35 -0000 1.144
+++ gas/config/tc-i386.c 4 Aug 2003 11:50:45 -0000
@@ -5612,8 +5612,9 @@ i386_intel_operand (operand_string, got_
/* Add the displacement expression. */
if (*s != '\0')
- ret = i386_displacement (s, s + strlen (s))
- && i386_index_check (s);
+ ret = i386_displacement (s, s + strlen (s));
+ if (ret)
+ ret = i386_index_check (operand_string);
}
}
> ****************************************************
> 80484e9: 8d bc 27 00 00 00 00 lea
> 0x0(%edi,1),%edi
> *****************************************************
> Now if we observe the binary code for lea
> 0x0(%edi,1),%edi it is obviously not correct. The
It is a quite correct, though unusual, encoding for lea 0(%edi,1),%edi,
which is a NOP (No Operation) instruction.
--
Alan Modra
IBM OzLabs - Linux Technology Centre