* config/tc-i386.c (output_jump): Set fx_signed for loop/jcxz.
authorAlan Modra <amodra@gmail.com>
Fri, 11 Oct 2002 00:25:32 +0000 (00:25 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 11 Oct 2002 00:25:32 +0000 (00:25 +0000)
(md_estimate_size_before_relax): Likewise for 8 bit branches.

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

index 5f9a5be3bbd89d01c7cd4f59ef419704a3080776..46379a2d9db2fce9011caa2efd30ad8a676c5091 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.
+
 Thu Oct 10 14:31:30 2002  J"orn Rennecke <joern.rennecke@superh.com>
 
        * config/tc-sh.c (assemble_ppi): Initialize reg_x / reg_y / reg_n
@@ -22,12 +28,12 @@ Thu Oct 10 14:31:30 2002  J"orn Rennecke <joern.rennecke@superh.com>
        (TC_FORCE_RELOCATION): Tidy arg.
 
 2002-09-30  Gavin Romig-Koch  <gavin@redhat.com>
-            Ken Raeburn  <raeburn@cygnus.com>
-            Aldy Hernandez  <aldyh@redhat.com>
-            DJ Delorie  <dj@redhat.com>
-            Michael Meissner  <meissner@redhat.com>
-            Eric Christopher  <echristo@redhat.com>
-            Richard Sandiford  <rsandifo@redhat.com>
+           Ken Raeburn  <raeburn@cygnus.com>
+           Aldy Hernandez  <aldyh@redhat.com>
+           DJ Delorie  <dj@redhat.com>
+           Michael Meissner  <meissner@redhat.com>
+           Eric Christopher  <echristo@redhat.com>
+           Richard Sandiford  <rsandifo@redhat.com>
 
        * doc/c-mips.texi: Add entries for -march=vr4120,vr4130,vr4181,
        vr5400 and vr5500.  Add entry for -mfix-vr4122-bugs.
@@ -53,7 +59,7 @@ Thu Oct 10 14:31:30 2002  J"orn Rennecke <joern.rennecke@superh.com>
        twice if howto->pcrel_offset is true.
 
 2002-09-28  Matt Thomas  <matt@3am-software.com>
-            Jason Thorpe  <thorpej@wasabisystems.com>
+           Jason Thorpe  <thorpej@wasabisystems.com>
 
        * config/tc-vax.c (md_estimate_size_before_relax): Only try to
        convert undefined references to GOT32/PLT32 if PIC code is
index b91b2bb996542c664b31410070b75017f71ed229..c7af77c77819bc8c64f2b0348231dbdd43b6a3ea 100644 (file)
@@ -3000,6 +3000,7 @@ output_jump ()
 {
   char *p;
   int size;
+  fixS *fixP;
 
   if (i.tm.opcode_modifier & JumpByte)
     {
@@ -3050,8 +3051,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
@@ -4394,11 +4401,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;
            }