* config/tc-mips.c (macro) [M_LA_AB]: Give an error for a offset
authorIan Lance Taylor <ian@airs.com>
Sat, 11 Dec 2004 03:41:31 +0000 (03:41 +0000)
committerIan Lance Taylor <ian@airs.com>
Sat, 11 Dec 2004 03:41:31 +0000 (03:41 +0000)
which is too large in the case of NO_PIC without 64-bit
addresses.

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

index 2d5a1865f42590c730859c9299ae6249f8be7ab6..ec03c7a7083c1ebfbe7c9523d3de083deb10bc17 100644 (file)
@@ -1,5 +1,9 @@
 2004-12-10  Ian Lance Taylor  <ian@wasabisystems.com>
 
+       * config/tc-mips.c (macro) [M_LA_AB]: Give an error for a offset
+       which is too large in the case of NO_PIC without 64-bit
+       addresses.
+
        * config/tc-mips.c (mips_in_shared): New static variable.
        (macro_build_lui): Permit "_gp" if !mips_in_shared.
        (md_longopts): Add -mshared and -mno-shared.
index 157c541a4860dbd8fc45a904db0e058795cc5083..f65727a04d2cba4005a4f31cb78c20121f4f1bb0 100644 (file)
@@ -4996,6 +4996,8 @@ macro (struct mips_cl_insn *ip)
                               tempreg, mips_gp_register, BFD_RELOC_GPREL16);
                  relax_switch ();
                }
+             if (!IS_SEXT_32BIT_NUM (offset_expr.X_add_number))
+               as_bad (_("offset too large"));
              macro_build_lui (&offset_expr, tempreg);
              macro_build (&offset_expr, ADDRESS_ADDI_INSN, "t,r,j",
                           tempreg, tempreg, BFD_RELOC_LO16);