bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible AS bug


From: Alan Modra
Subject: Re: Possible AS bug
Date: Mon, 04 Aug 2003 21:28:58 +0930
User-agent: Mutt/1.4i

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]