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

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

Re: GAS/i386/Linux: refuses 64-bit MMX memory ops in Intel syntax


From: Alan Modra
Subject: Re: GAS/i386/Linux: refuses 64-bit MMX memory ops in Intel syntax
Date: Fri, 12 Jul 2002 13:17:50 +0930
User-agent: Mutt/1.3.25i

On Fri, Jul 12, 2002 at 12:41:11PM +0930, Alan Modra wrote:
> On Fri, Jul 12, 2002 at 01:04:44AM +0200, Haakon Riiser wrote:
> >     movq    QWORD PTR [%esp], %mm0
> >   intel.s: Assembler messages:
> >   intel.s:7: Error: 64bit operations available only in 64bit modes.
> 
> See http://sources.redhat.com/ml/binutils/2002-04/msg00155.html and the
> followup, http://sources.redhat.com/ml/binutils/2002-04/msg00157.html

Thinking about this some more, I suppose we can just remove the
warning.

        * config/tc-i386.c (process_suffix): Merge CODE_64BIT JumpByte
        case with non CODE_64BIT case.  Don't warn on "qword ptr" if
        not CODE_64BIT.

Committed.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

Index: gas/config/tc-i386.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i386.c,v
retrieving revision 1.122
diff -u -p -r1.122 tc-i386.c
--- gas/config/tc-i386.c        9 Jul 2002 09:46:18 -0000       1.122
+++ gas/config/tc-i386.c        12 Jul 2002 03:42:09 -0000
@@ -2228,8 +2228,10 @@ process_suffix ()
         size prefix, except for instructions that will ignore this
         prefix anyway.  */
       if (i.suffix != QWORD_MNEM_SUFFIX
-         && (i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT)
-         && !(i.tm.opcode_modifier & IgnoreSize))
+         && !(i.tm.opcode_modifier & IgnoreSize)
+         && ((i.suffix == LONG_MNEM_SUFFIX) == (flag_code == CODE_16BIT)
+             || (flag_code == CODE_64BIT
+                 && (i.tm.opcode_modifier & JumpByte))))
        {
          unsigned int prefix = DATA_PREFIX_OPCODE;
          if (i.tm.opcode_modifier & JumpByte) /* jcxz, loop */
@@ -2239,25 +2241,11 @@ process_suffix ()
            return 0;
        }
 
-      if (i.suffix != QWORD_MNEM_SUFFIX && (flag_code == CODE_64BIT)
-         && !(i.tm.opcode_modifier & IgnoreSize)
-         && (i.tm.opcode_modifier & JumpByte))
-       {
-         if (!add_prefix (ADDR_PREFIX_OPCODE))
-           return 0;
-       }
-
       /* Set mode64 for an operand.  */
       if (i.suffix == QWORD_MNEM_SUFFIX
+         && flag_code == CODE_64BIT
          && (i.tm.opcode_modifier & NoRex64) == 0)
-       {
-         i.rex |= REX_MODE64;
-         if (flag_code < CODE_64BIT)
-           {
-             as_bad (_("64bit operations available only in 64bit modes."));
-             return 0;
-           }
-       }
+       i.rex |= REX_MODE64;
 
       /* Size floating point instruction.  */
       if (i.suffix == LONG_MNEM_SUFFIX)



reply via email to

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