* config/tc-i386.c (process_operands): Warn about "lea" segment
authorAlan Modra <amodra@gmail.com>
Tue, 24 Sep 2002 01:46:42 +0000 (01:46 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 24 Sep 2002 01:46:42 +0000 (01:46 +0000)
overrides.

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

index 97dd2cde9d3b10a0bdf64c660b99aa0cc20e3653..eaef1392d3560e21b31ca234c594d2880078978c 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-22  Mark Elbrecht  <snowball3@softhome.net>
 
        * write.c: Delete set_segment_vma and prototype. Update all callers.
index c46b65b5a9a56aeee12293b316fef071a6ad033a..4db65b8349a1dbabd26f053287d36f2693f26e45 100644 (file)
@@ -2604,9 +2604,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 ();
     }
@@ -2633,12 +2632,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] && !quiet_warnings)
+    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))
This page took 0.033389 seconds and 4 git commands to generate.