* config/tc-mips.c (append_insn): Fix jump overflow check.
authorThiemo Seufer <ths@networkno.de>
Thu, 26 Sep 2002 09:00:08 +0000 (09:00 +0000)
committerThiemo Seufer <ths@networkno.de>
Thu, 26 Sep 2002 09:00:08 +0000 (09:00 +0000)
* gas/mips/jal-range.s: Fix jump overflow check.
* gas/mips/jal-range.l: Likewise.

gas/ChangeLog
gas/config/tc-mips.c
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/jal-range.l
gas/testsuite/gas/mips/jal-range.s

index eaef1392d3560e21b31ca234c594d2880078978c..eda63ad82fd3d93a2d6782697b7a020897f8b7b5 100644 (file)
@@ -1,3 +1,7 @@
+2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * config/tc-mips.c (append_insn): Fix jump overflow check.
+
 2002-09-24  Alan Modra  <amodra@bigpond.net.au>
 
        * config/tc-i386.c (process_operands): Warn about "lea" segment
index ba803d215885785bee07685f92c05affbb7c601f..bd797c4bc4ff96599b5c55d7b31b6e9af50a9b1a 100644 (file)
@@ -1858,8 +1858,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
              if ((address_expr->X_add_number & 3) != 0)
                as_bad (_("jump to misaligned address (0x%lx)"),
                        (unsigned long) address_expr->X_add_number);
-             if (address_expr->X_add_number & ~0xfffffff
-                 || address_expr->X_add_number > 0x7fffffc)
+             if (address_expr->X_add_number & ~0xfffffff)
                as_bad (_("jump address range overflow (0x%lx)"),
                        (unsigned long) address_expr->X_add_number);
              ip->insn_opcode |= (address_expr->X_add_number >> 2) & 0x3ffffff;
@@ -1869,8 +1868,7 @@ append_insn (place, ip, address_expr, reloc_type, unmatched_hi)
              if ((address_expr->X_add_number & 3) != 0)
                as_bad (_("jump to misaligned address (0x%lx)"),
                        (unsigned long) address_expr->X_add_number);
-             if (address_expr->X_add_number & ~0xfffffff
-                 || address_expr->X_add_number > 0x7fffffc)
+             if (address_expr->X_add_number & ~0xfffffff)
                as_bad (_("jump address range overflow (0x%lx)"),
                        (unsigned long) address_expr->X_add_number);
              ip->insn_opcode |=
index 9523d4858b6341ef40045e8349053b3609c2401f..159a61734f93697587a007e5bf9040c438eadb42 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+       * gas/mips/jal-range.s: Fix jump overflow check.
+       * gas/mips/jal-range.l: Likewise.
+
 2002-09-23  Nick Clifton  <nickc@redhat.com>
 
        * gas/arm/armv1-bad.s: Add LDM and STM instructions which are
index 79a2509deebdafd2f8dc89235360e8971d30e5d2..3887e1812c2845395a446ba57be842aa7d4e9426 100644 (file)
@@ -1,4 +1,4 @@
 .*: Assembler messages:
-.*:5: Error: jump to misaligned address \(0x7fffffd\)
-.*:5: Error: jump address range overflow \(0x7fffffd\)
-.*:6: Error: jump address range overflow \(0x8000000\)
+.*:4: Error: jump to misaligned address \(0x1\)
+.*:6: Error: jump to misaligned address \(0xfffffff\)
+.*:7: Error: jump address range overflow \(0x10000000\)
index 4d843b131a22ac3786ad58c8f9acf48ac18b1862..e52f56024add44ae891943cfec67e3947fe2dcd1 100644 (file)
@@ -1,6 +1,7 @@
 # Source file use to test border cases of jumps
 
        jal     0x0
-       jal     0x7fffffc
-       jal     0x7fffffd
-       jal     0x8000000
+       jal     0x1
+       jal     0xffffffc
+       jal     0xfffffff
+       jal     0x10000000