]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-i386.c (output_jump): Set fx_signed for loop/jcxz.
authorAlan Modra <amodra@gmail.com>
Fri, 11 Oct 2002 00:33:01 +0000 (00:33 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 11 Oct 2002 00:33:01 +0000 (00:33 +0000)
(md_estimate_size_before_relax): Likewise for 8 bit branches.

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

index f0901e6101caf5f8317a502e65129ec338476632..55fe8f2dd3d9806a3ca80434f84ea0d30aa52296 100644 (file)
@@ -1,3 +1,9 @@
+2002-10-11  Michel Six  <msix@ccr.jussieu.fr>
+           Alan Modra  <amodra@bigpond.net.au>
+
+       * config/tc-i386.c (output_jump): Set fx_signed for loop/jcxz.
+       (md_estimate_size_before_relax): Likewise for 8 bit branches.
+
 2002-09-24  Alan Modra  <amodra@bigpond.net.au>
 
        * config/tc-i386.c (process_operands): Warn about "lea" segment
index 8bbdaca1a2d1a63ce444cfcc19ffbec45ec1ae3d..fc1bd134f2062a4bcdeda1fcb15d6e541369c844 100644 (file)
@@ -2617,7 +2617,7 @@ process_operands ()
       default_seg = &ds;
     }
 
-  if (i.tm.base_opcode == 0x8d /* lea */ && i.seg[0])
+  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
@@ -2975,6 +2975,7 @@ output_jump ()
 {
   char *p;
   int size;
+  fixS *fixP;
 
   if (i.tm.opcode_modifier & JumpByte)
     {
@@ -3025,8 +3026,14 @@ output_jump ()
   p = frag_more (1 + size);
   *p++ = i.tm.base_opcode;
 
-  fix_new_exp (frag_now, p - frag_now->fr_literal, size,
-              i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0]));
+  fixP = fix_new_exp (frag_now, p - frag_now->fr_literal, size,
+                     i.op[0].disps, 1, reloc (size, 1, 1, i.reloc[0]));
+
+  /* All jumps handled here are signed, but don't use a signed limit
+     check for 32 and 16 bit jumps as we want to allow wrap around at
+     4G and 64k respectively.  */
+  if (size == 1)
+    fixP->fx_signed = 1;
 }
 
 static void
@@ -4368,11 +4375,14 @@ md_estimate_size_before_relax (fragP, segment)
        case COND_JUMP:
          if (no_cond_jump_promotion && fragP->fr_var == NO_RELOC)
            {
+             fixS *fixP;
+
              fragP->fr_fix += 1;
-             fix_new (fragP, old_fr_fix, 1,
-                      fragP->fr_symbol,
-                      fragP->fr_offset, 1,
-                      BFD_RELOC_8_PCREL);
+             fixP = fix_new (fragP, old_fr_fix, 1,
+                             fragP->fr_symbol,
+                             fragP->fr_offset, 1,
+                             BFD_RELOC_8_PCREL);
+             fixP->fx_signed = 1;
              break;
            }