+2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * config/tc-mips.c (macro) <ld_st>: Don't load a zero into an
+ auxiliary register when using a signed 16-bit constant offset.
+
2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (mips_ip): Remove lastregno's
is in non PIC code. */
if (offset_expr.X_op == O_constant)
{
- expr1.X_add_number = ((offset_expr.X_add_number + 0x8000)
- & ~(bfd_vma) 0xffff);
+ expr1.X_add_number = offset_expr.X_add_number;
normalize_address_expr (&expr1);
- load_register (tempreg, &expr1, HAVE_64BIT_ADDRESSES);
- if (breg != 0)
- macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
- tempreg, tempreg, breg);
- macro_build (&offset_expr, s, fmt, treg, BFD_RELOC_LO16, tempreg);
+ if (!IS_SEXT_16BIT_NUM (expr1.X_add_number))
+ {
+ expr1.X_add_number = ((expr1.X_add_number + 0x8000)
+ & ~(bfd_vma) 0xffff);
+ load_register (tempreg, &expr1, HAVE_64BIT_ADDRESSES);
+ if (breg != 0)
+ macro_build (NULL, ADDRESS_ADD_INSN, "d,v,t",
+ tempreg, tempreg, breg);
+ breg = tempreg;
+ }
+ macro_build (&offset_expr, s, fmt, treg, BFD_RELOC_LO16, breg);
}
else if (mips_pic == NO_PIC)
{
+2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gas/mips/ldstla-32.d: Update according to a 16-bit constant
+ offset optimization.
+ * gas/mips/ldstla-32-mips3.d: Likewise.
+ * gas/mips/ldstla-32-shared.d: Likewise.
+ * gas/mips/ldstla-32-mips3-shared.d: Likewise.
+
2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
* gas/mips/at-2.l: Adjust according to message capitalization
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: dc424567 ld v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: dc420000 ld v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: dc42ffff ld v0,-1\(v0\)
+[ 0-9a-f]+: dc820000 ld v0,0\(a0\)
+[ 0-9a-f]+: dc82ffff ld v0,-1\(a0\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: dc42ef01 ld v0,-4351\(v0\)
[ 0-9a-f]+: dc42ffff ld v0,-1\(v0\)
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: dc424567 ld v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: dc420000 ld v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: dc42ffff ld v0,-1\(v0\)
+[ 0-9a-f]+: dc020000 ld v0,0\(zero\)
+[ 0-9a-f]+: dc02ffff ld v0,-1\(zero\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: dc42ef01 ld v0,-4351\(v0\)
[ 0-9a-f]+: 3c028000 lui v0,0x8000
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: fc224567 sd v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: fc220000 sd v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: fc22ffff sd v0,-1\(at\)
+[ 0-9a-f]+: fc820000 sd v0,0\(a0\)
+[ 0-9a-f]+: fc82ffff sd v0,-1\(a0\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: fc22ef01 sd v0,-4351\(at\)
[ 0-9a-f]+: fc22ffff sd v0,-1\(at\)
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: fc224567 sd v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: fc220000 sd v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: fc22ffff sd v0,-1\(at\)
+[ 0-9a-f]+: fc020000 sd v0,0\(zero\)
+[ 0-9a-f]+: fc02ffff sd v0,-1\(zero\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: fc22ef01 sd v0,-4351\(at\)
[ 0-9a-f]+: 3c018000 lui at,0x8000
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c820000 lw v0,0\(a0\)
+[ 0-9a-f]+: 8c82ffff lw v0,-1\(a0\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c020000 lw v0,0\(zero\)
+[ 0-9a-f]+: 8c02ffff lw v0,-1\(zero\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 3c028000 lui v0,0x8000
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac820000 sw v0,0\(a0\)
+[ 0-9a-f]+: ac82ffff sw v0,-1\(a0\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac020000 sw v0,0\(zero\)
+[ 0-9a-f]+: ac02ffff sw v0,-1\(zero\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: 3c018000 lui at,0x8000
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: dc424567 ld v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: dc420000 ld v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: dc42ffff ld v0,-1\(v0\)
+[ 0-9a-f]+: dc820000 ld v0,0\(a0\)
+[ 0-9a-f]+: dc82ffff ld v0,-1\(a0\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: dc42ef01 ld v0,-4351\(v0\)
[ 0-9a-f]+: dc42ffff ld v0,-1\(v0\)
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: dc424567 ld v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: dc420000 ld v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: dc42ffff ld v0,-1\(v0\)
+[ 0-9a-f]+: dc020000 ld v0,0\(zero\)
+[ 0-9a-f]+: dc02ffff ld v0,-1\(zero\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: dc42ef01 ld v0,-4351\(v0\)
[ 0-9a-f]+: 3c028000 lui v0,0x8000
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: fc224567 sd v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: fc220000 sd v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: fc22ffff sd v0,-1\(at\)
+[ 0-9a-f]+: fc820000 sd v0,0\(a0\)
+[ 0-9a-f]+: fc82ffff sd v0,-1\(a0\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: fc22ef01 sd v0,-4351\(at\)
[ 0-9a-f]+: fc22ffff sd v0,-1\(at\)
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: fc224567 sd v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: fc220000 sd v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: fc22ffff sd v0,-1\(at\)
+[ 0-9a-f]+: fc020000 sd v0,0\(zero\)
+[ 0-9a-f]+: fc02ffff sd v0,-1\(zero\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: fc22ef01 sd v0,-4351\(at\)
[ 0-9a-f]+: 3c018000 lui at,0x8000
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c820000 lw v0,0\(a0\)
+[ 0-9a-f]+: 8c82ffff lw v0,-1\(a0\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c020000 lw v0,0\(zero\)
+[ 0-9a-f]+: 8c02ffff lw v0,-1\(zero\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 3c028000 lui v0,0x8000
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac820000 sw v0,0\(a0\)
+[ 0-9a-f]+: ac82ffff sw v0,-1\(a0\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac020000 sw v0,0\(zero\)
+[ 0-9a-f]+: ac02ffff sw v0,-1\(zero\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: 3c018000 lui at,0x8000
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c820000 lw v0,0\(a0\)
+[ 0-9a-f]+: 8c82ffff lw v0,-1\(a0\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c020000 lw v0,0\(zero\)
+[ 0-9a-f]+: 8c02ffff lw v0,-1\(zero\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 3c028000 lui v0,0x8000
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac820000 sw v0,0\(a0\)
+[ 0-9a-f]+: ac82ffff sw v0,-1\(a0\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac020000 sw v0,0\(zero\)
+[ 0-9a-f]+: ac02ffff sw v0,-1\(zero\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: 3c018000 lui at,0x8000
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 00441021 addu v0,v0,a0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c820000 lw v0,0\(a0\)
+[ 0-9a-f]+: 8c82ffff lw v0,-1\(a0\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 00441021 addu v0,v0,a0
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
[ 0-9a-f]+: 3c020123 lui v0,0x123
[ 0-9a-f]+: 8c424567 lw v0,17767\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c420000 lw v0,0\(v0\)
-[ 0-9a-f]+: 24020000 li v0,0
-[ 0-9a-f]+: 8c42ffff lw v0,-1\(v0\)
+[ 0-9a-f]+: 8c020000 lw v0,0\(zero\)
+[ 0-9a-f]+: 8c02ffff lw v0,-1\(zero\)
[ 0-9a-f]+: 3c02abce lui v0,0xabce
[ 0-9a-f]+: 8c42ef01 lw v0,-4351\(v0\)
[ 0-9a-f]+: 3c028000 lui v0,0x8000
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: 00240821 addu at,at,a0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac820000 sw v0,0\(a0\)
+[ 0-9a-f]+: ac82ffff sw v0,-1\(a0\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: 00240821 addu at,at,a0
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
[ 0-9a-f]+: 3c010123 lui at,0x123
[ 0-9a-f]+: ac224567 sw v0,17767\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac220000 sw v0,0\(at\)
-[ 0-9a-f]+: 24010000 li at,0
-[ 0-9a-f]+: ac22ffff sw v0,-1\(at\)
+[ 0-9a-f]+: ac020000 sw v0,0\(zero\)
+[ 0-9a-f]+: ac02ffff sw v0,-1\(zero\)
[ 0-9a-f]+: 3c01abce lui at,0xabce
[ 0-9a-f]+: ac22ef01 sw v0,-4351\(at\)
[ 0-9a-f]+: 3c018000 lui at,0x8000