From 0a6ace1e0e838a2a1abb2989c4f449626dec479a Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 6 Dec 2003 13:52:23 +0000 Subject: gas/ * config/tc-mips.c (macro): Switch misordered call to frag_grow() and setting of tc_fr_offset. gas/testsuite/ * gas/mips/elf-rel16.[sd]: New test. * gas/mips/mips.exp: Run it. * gas/mips/elf-rel-xgot-n32.d: Fix addends for "lw $5,dl1+34($5)". * gas/mips/elf-rel-xgot-n64.d: Likewise. --- gas/config/tc-mips.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gas/config') diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 1afd8bf..d60e75f 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -6348,13 +6348,13 @@ macro (struct mips_cl_insn *ip) lw $tempreg,($gp) (BFD_RELOC_MIPS_GOT_PAGE) $treg,($tempreg) (BFD_RELOC_MIPS_GOT_OFST) */ assert (offset_expr.X_op == O_symbol); + frag_grow (36); frag_now->tc_frag_data.tc_fr_offset = expr1.X_add_number = offset_expr.X_add_number; offset_expr.X_add_number = 0; if (expr1.X_add_number < -0x8000 || expr1.X_add_number >= 0x8000) as_bad (_("PIC code offset overflow (max 16 signed bits)")); - frag_grow (36); macro_build (NULL, &icnt, &offset_expr, "lui", "t,u", tempreg, BFD_RELOC_MIPS_GOT_HI16); macro_build (NULL, &icnt, NULL, ADDRESS_ADD_INSN, "d,v,t", -- cgit v1.1