]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-i386.c (process_operands): Warn about "lea" segment
authorAlan Modra <amodra@gmail.com>
Tue, 24 Sep 2002 01:47:49 +0000 (01:47 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 24 Sep 2002 01:47:49 +0000 (01:47 +0000)
overrides.

gas/ChangeLog
gas/config/tc-i386.c

index e14abbb765f4ee85fb14a28654c5ddbcda28e0eb..f0901e6101caf5f8317a502e65129ec338476632 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-24  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/tc-i386.c (process_operands): Warn about "lea" segment
+       overrides.
+
 2002-09-23  Daniel Jacobowitz  <drow@mvista.com>
 
        Merge from mainline:
index 5ba79cbadf17a23165c5a254269fe1149903e2e6..8bbdaca1a2d1a63ce444cfcc19ffbec45ec1ae3d 100644 (file)
@@ -2589,9 +2589,8 @@ process_operands ()
   else if (i.tm.opcode_modifier & Modrm)
     {
       /* The opcode is completed (modulo i.tm.extension_opcode which
-        must be put into the modrm byte).
-        Now, we make the modrm & index base bytes based on all the
-        info we've collected.  */
+        must be put into the modrm byte).  Now, we make the modrm and
+        index base bytes based on all the info we've collected.  */
 
       default_seg = build_modrm_byte ();
     }
@@ -2618,12 +2617,14 @@ process_operands ()
       default_seg = &ds;
     }
 
-  /* If a segment was explicitly specified,
-     and the specified segment is not the default,
-     use an opcode prefix to select it.
-     If we never figured out what the default segment is,
-     then default_seg will be zero at this point,
-     and the specified segment prefix will always be used.  */
+  if (i.tm.base_opcode == 0x8d /* lea */ && i.seg[0])
+    as_warn (_("segment override on `lea' is ineffectual"));
+
+  /* If a segment was explicitly specified, and the specified segment
+     is not the default, use an opcode prefix to select it.  If we
+     never figured out what the default segment is, then default_seg
+     will be zero at this point, and the specified segment prefix will
+     always be used.  */
   if ((i.seg[0]) && (i.seg[0] != default_seg))
     {
       if (!add_prefix (i.seg[0]->seg_prefix))