#define HAVE_64BIT_ADDRESS_CONSTANTS (HAVE_64BIT_ADDRESSES \
|| HAVE_64BIT_GPRS)
+/* Addresses are loaded in different ways, depending on the address
+ size in use and the ABI. N32_ABI uses additions with overflow
+ checking, this allows to catch code generation errors which would
+ distort the proper sign extension of the 64-bit wide registers. */
+#define ADDRESS_ADD_INSN \
+ (HAVE_32BIT_ADDRESSES ? (HAVE_NEWABI ? "add" : "addu") : "daddu")
+
+#define ADDRESS_ADDI_INSN \
+ (HAVE_32BIT_ADDRESSES ? (HAVE_NEWABI ? "addi" : "addiu") : "daddiu")
+
+#define ADDRESS_LOAD_INSN \
+ (HAVE_32BIT_ADDRESSES ? "lw" : "ld")
+
+#define ADDRESS_STORE_INSN \
+ (HAVE_32BIT_ADDRESSES ? "sw" : "sd")
+
/* Return true if the given CPU supports the MIPS16 ASE. */
#define CPU_HAS_MIPS16(cpu) \
(strncmp (TARGET_CPU, "mips16", sizeof ("mips16") - 1) == 0 \
macro_build_lui (place, counter, ep, AT);
if (place != NULL)
place += 4;
- macro_build (place, counter, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
+ macro_build (place, counter, (expressionS *) NULL, ADDRESS_ADD_INSN,
"d,v,t", AT, AT, breg);
if (place != NULL)
place += 4;
&& ! nopic_need_relax (ep->X_add_symbol, 1))
{
frag_grow (20);
- macro_build ((char *) NULL, counter, ep,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "addi" : "addiu" : "daddiu", "t,r,j",
- reg, mips_gp_register, (int) BFD_RELOC_GPREL16);
+ macro_build ((char *) NULL, counter, ep, ADDRESS_ADDI_INSN,
+ "t,r,j", reg, mips_gp_register,
+ (int) BFD_RELOC_GPREL16);
p = frag_var (rs_machine_dependent, 8, 0,
RELAX_ENCODE (4, 8, 0, 4, 0,
mips_opts.warn_about_macros),
macro_build_lui (p, counter, ep, reg);
if (p != NULL)
p += 4;
- macro_build (p, counter, ep,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "addi" : "addiu" : "daddiu",
+ macro_build (p, counter, ep, ADDRESS_ADDI_INSN,
"t,r,j", reg, reg, (int) BFD_RELOC_LO16);
}
}
frag_now->tc_frag_data.tc_fr_offset =
ex.X_add_number = ep->X_add_number;
ep->X_add_number = 0;
- macro_build ((char *) NULL, counter, ep,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)", reg,
- (int) BFD_RELOC_MIPS_GOT_DISP, mips_gp_register);
+ macro_build ((char *) NULL, counter, ep, ADDRESS_LOAD_INSN,
+ "t,o(b)", reg, (int) BFD_RELOC_MIPS_GOT_DISP,
+ mips_gp_register);
if (ex.X_add_number < -0x8000 || ex.X_add_number >= 0x8000)
as_bad (_("PIC code offset overflow (max 16 signed bits)"));
ex.X_op = O_constant;
- macro_build ((char *) NULL, counter, &ex,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
+ macro_build ((char *) NULL, counter, &ex, ADDRESS_ADDI_INSN,
"t,r,j", reg, reg, (int) BFD_RELOC_LO16);
p = frag_var (rs_machine_dependent, 8, 0,
RELAX_ENCODE (8, 4, 0, 0, 0,
ep->X_add_number = ex.X_add_number;
}
- macro_build (p, counter, ep,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)", reg,
+ macro_build (p, counter, ep, ADDRESS_LOAD_INSN, "t,o(b)", reg,
(int) BFD_RELOC_MIPS_GOT_DISP, mips_gp_register);
if (! p)
ex.X_add_number = ep->X_add_number;
ep->X_add_number = 0;
frag_grow (20);
- macro_build ((char *) NULL, counter, ep,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)",
- reg, (int) BFD_RELOC_MIPS_GOT16, mips_gp_register);
+ macro_build ((char *) NULL, counter, ep, ADDRESS_LOAD_INSN,
+ "t,o(b)", reg, (int) BFD_RELOC_MIPS_GOT16,
+ mips_gp_register);
macro_build ((char *) NULL, counter, (expressionS *) NULL, "nop", "");
p = frag_var (rs_machine_dependent, 4, 0,
RELAX_ENCODE (0, 4, -8, 0, 0, mips_opts.warn_about_macros),
ep->X_add_symbol, (offsetT) 0, (char *) NULL);
- macro_build (p, counter, ep,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, counter, ep, ADDRESS_ADDI_INSN,
"t,r,j", reg, reg, (int) BFD_RELOC_LO16);
if (ex.X_add_number != 0)
if (ex.X_add_number < -0x8000 || ex.X_add_number >= 0x8000)
as_bad (_("PIC code offset overflow (max 16 signed bits)"));
ex.X_op = O_constant;
- macro_build ((char *) NULL, counter, &ex,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build ((char *) NULL, counter, &ex, ADDRESS_ADDI_INSN,
"t,r,j", reg, reg, (int) BFD_RELOC_LO16);
}
}
macro_build ((char *) NULL, counter, ep, "lui", "t,u", reg,
(int) BFD_RELOC_MIPS_GOT_HI16);
macro_build ((char *) NULL, counter, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu", "d,v,t", reg,
- reg, mips_gp_register);
- macro_build ((char *) NULL, counter, ep,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ ADDRESS_ADD_INSN, "d,v,t", reg, reg, mips_gp_register);
+ macro_build ((char *) NULL, counter, ep, ADDRESS_LOAD_INSN,
"t,o(b)", reg, (int) BFD_RELOC_MIPS_GOT_LO16, reg);
if (ex.X_add_number < -0x8000 || ex.X_add_number >= 0x8000)
as_bad (_("PIC code offset overflow (max 16 signed bits)"));
else if (ex.X_add_number)
{
ex.X_op = O_constant;
- macro_build ((char *) NULL, counter, &ex,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
+ macro_build ((char *) NULL, counter, &ex, ADDRESS_ADDI_INSN,
"t,r,j", reg, reg, (int) BFD_RELOC_LO16);
}
RELAX_ENCODE (ex.X_add_number ? 16 : 12, 8, 0, 4, 0,
mips_opts.warn_about_macros),
ep->X_add_symbol, 0, (char *) NULL);
- macro_build (p, counter, ep,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)", reg,
+ macro_build (p, counter, ep, ADDRESS_LOAD_INSN, "t,o(b)", reg,
(int) BFD_RELOC_MIPS_GOT_PAGE, mips_gp_register);
- macro_build (p + 4, counter, ep,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu", "t,r,j",
+ macro_build (p + 4, counter, ep, ADDRESS_ADDI_INSN, "t,r,j",
reg, reg, (int) BFD_RELOC_MIPS_GOT_OFST);
}
else
macro_build ((char *) NULL, counter, ep, "lui", "t,u", reg,
(int) BFD_RELOC_MIPS_GOT_HI16);
macro_build ((char *) NULL, counter, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu", "d,v,t", reg,
- reg, mips_gp_register);
- macro_build ((char *) NULL, counter, ep,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ ADDRESS_ADD_INSN, "d,v,t", reg, reg, mips_gp_register);
+ macro_build ((char *) NULL, counter, ep, ADDRESS_LOAD_INSN,
"t,o(b)", reg, (int) BFD_RELOC_MIPS_GOT_LO16, reg);
p = frag_var (rs_machine_dependent, 12 + off, 0,
RELAX_ENCODE (12, 12 + off, off, 8 + off, 0,
macro_build (p, counter, (expressionS *) NULL, "nop", "");
p += 4;
}
- macro_build (p, counter, ep,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)", reg,
+ macro_build (p, counter, ep, ADDRESS_LOAD_INSN, "t,o(b)", reg,
(int) BFD_RELOC_MIPS_GOT16, mips_gp_register);
p += 4;
macro_build (p, counter, (expressionS *) NULL, "nop", "");
p += 4;
- macro_build (p, counter, ep,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, counter, ep, ADDRESS_ADDI_INSN,
"t,r,j", reg, reg, (int) BFD_RELOC_LO16);
if (ex.X_add_number != 0)
if (ex.X_add_number < -0x8000 || ex.X_add_number >= 0x8000)
as_bad (_("PIC code offset overflow (max 16 signed bits)"));
ex.X_op = O_constant;
- macro_build ((char *) NULL, counter, &ex,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build ((char *) NULL, counter, &ex, ADDRESS_ADDI_INSN,
"t,r,j", reg, reg, (int) BFD_RELOC_LO16);
}
}
/* We always do
addiu $reg,$gp,<sym> (BFD_RELOC_GPREL16)
*/
- macro_build ((char *) NULL, counter, ep,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build ((char *) NULL, counter, ep, ADDRESS_ADDI_INSN,
"t,r,j", reg, mips_gp_register, (int) BFD_RELOC_GPREL16);
}
else
{
frag_grow (20);
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_NEWABI ? "addi" : "addiu",
- "t,r,j", tempreg, mips_gp_register,
- (int) BFD_RELOC_GPREL16);
+ ADDRESS_ADDI_INSN, "t,r,j", tempreg,
+ mips_gp_register, (int) BFD_RELOC_GPREL16);
p = frag_var (rs_machine_dependent, 8, 0,
RELAX_ENCODE (4, 8, 0, 4, 0,
mips_opts.warn_about_macros),
macro_build_lui (p, &icnt, &offset_expr, tempreg);
if (p != NULL)
p += 4;
- macro_build (p, &icnt, &offset_expr,
- HAVE_NEWABI ? "addi" : "addiu",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
}
}
frag_grow (32);
if (expr1.X_add_number == 0 && tempreg == PIC_CALL_REG)
lw_reloc_type = (int) BFD_RELOC_MIPS_CALL16;
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", tempreg, lw_reloc_type, mips_gp_register);
if (expr1.X_add_number == 0)
{
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
}
- macro_build (p, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
/* FIXME: If breg == 0, and the next instruction uses
$tempreg, then if this variant case is used an extra
{
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
"nop", "");
- macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build ((char *) NULL, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
frag_var (rs_machine_dependent, 0, 0,
RELAX_ENCODE (0, 0, -12, -4, 0, 0),
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
"nop", "");
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", treg, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", treg, AT, breg);
breg = 0;
tempreg = treg;
off1 = -8;
macro_build_lui (NULL, &icnt, &expr1, AT);
mips_optimize = hold_mips_optimize;
- macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build ((char *) NULL, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", AT, AT, (int) BFD_RELOC_LO16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", tempreg, tempreg, AT);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg, AT);
frag_var (rs_machine_dependent, 0, 0,
RELAX_ENCODE (0, 0, -16 + off1, -8, 0, 0),
offset_expr.X_add_symbol, 0, NULL);
offset_expr.X_add_number = 0;
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", tempreg, lw_reloc_type,
- mips_gp_register);
+ ADDRESS_LOAD_INSN, "t,o(b)", tempreg,
+ lw_reloc_type, mips_gp_register);
if (expr1.X_add_number >= -0x8000
&& expr1.X_add_number < 0x8000)
{
macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
- "t,r,j", tempreg, tempreg,
+ ADDRESS_ADDI_INSN, "t,r,j", tempreg, tempreg,
(int) BFD_RELOC_LO16);
p = frag_var (rs_machine_dependent, 4, 0,
RELAX_ENCODE (8, 4, 0, 0, 0, 0),
{
assert (tempreg == AT);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", treg, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", treg, AT, breg);
dreg = treg;
adj = 4;
}
macro_build_lui ((char *) NULL, &icnt, &expr1, AT);
macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
- "t,r,j", AT, AT, (int) BFD_RELOC_LO16);
+ ADDRESS_ADDI_INSN, "t,r,j", AT, AT,
+ (int) BFD_RELOC_LO16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", dreg, dreg, AT);
+ ADDRESS_ADD_INSN, "d,v,t", dreg, dreg, AT);
p = frag_var (rs_machine_dependent, 4 + adj, 0,
RELAX_ENCODE (16 + adj, 4 + adj,
offset_expr.X_add_number = expr1.X_add_number;
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT_DISP,
mips_gp_register);
if (adj)
{
macro_build (p + 4, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", treg, tempreg, breg);
+ ADDRESS_ADD_INSN, "d,v,t",
+ treg, tempreg, breg);
breg = 0;
tempreg = treg;
}
else
{
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", tempreg, lw_reloc_type,
- mips_gp_register);
+ ADDRESS_LOAD_INSN, "t,o(b)", tempreg,
+ lw_reloc_type, mips_gp_register);
if (lw_reloc_type != BFD_RELOC_MIPS_GOT_DISP)
p = frag_var (rs_machine_dependent, 0, 0,
RELAX_ENCODE (0, 0, -4, 0, 0, 0),
macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u",
tempreg, lui_reloc_type);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", tempreg, tempreg, mips_gp_register);
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg,
+ mips_gp_register);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", tempreg, lw_reloc_type, tempreg);
if (expr1.X_add_number == 0)
{
{
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
"nop", "");
- macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build ((char *) NULL, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
p = frag_var (rs_machine_dependent, 12 + gpdel, 0,
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
"nop", "");
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", treg, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", treg, AT, breg);
dreg = treg;
adj = 8;
}
macro_build_lui (NULL, &icnt, &expr1, AT);
mips_optimize = hold_mips_optimize;
- macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build ((char *) NULL, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", AT, AT, (int) BFD_RELOC_LO16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", dreg, dreg, AT);
+ ADDRESS_ADD_INSN, "d,v,t", dreg, dreg, AT);
p = frag_var (rs_machine_dependent, 16 + gpdel + adj, 0,
RELAX_ENCODE (24 + adj, 16 + gpdel + adj, gpdel,
p += 4;
}
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", tempreg,
- local_reloc_type,
- mips_gp_register);
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN, "t,o(b)",
+ tempreg, local_reloc_type, mips_gp_register);
p += 4;
if (expr1.X_add_number >= -0x8000
&& expr1.X_add_number < 0x8000)
{
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
- macro_build (p, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
/* FIXME: If add_number is 0, and there was no base
register, the external symbol case ended with a load,
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
macro_build (p, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", treg, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", treg, AT, breg);
p += 4;
tempreg = treg;
/* We set breg to 0 because we have arranged to add
macro_build_lui (p, &icnt, &expr1, AT);
p += 4;
- macro_build (p, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", AT, AT, (int) BFD_RELOC_LO16);
p += 4;
- macro_build (p, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
+ macro_build (p, &icnt, (expressionS *) NULL, ADDRESS_ADD_INSN,
"d,v,t", tempreg, tempreg, AT);
p += 4;
}
macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u",
tempreg, lui_reloc_type);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", tempreg, tempreg, mips_gp_register);
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg,
+ mips_gp_register);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", tempreg, lw_reloc_type, tempreg);
if (expr1.X_add_number == 0)
else if (expr1.X_add_number >= -0x8000
&& expr1.X_add_number < 0x8000)
{
- macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
+ macro_build ((char *) NULL, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg,
(int) BFD_RELOC_LO16);
p = frag_var (rs_machine_dependent, 8, 0,
{
assert (tempreg == AT);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", treg, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", treg, AT, breg);
dreg = treg;
adj = 4;
}
/* Set mips_optimize around the lui instruction to avoid
inserting an unnecessary nop after the lw. */
macro_build_lui ((char *) NULL, &icnt, &expr1, AT);
- macro_build ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
+ macro_build ((char *) NULL, &icnt, &expr1, ADDRESS_ADDI_INSN,
"t,r,j", AT, AT, (int) BFD_RELOC_LO16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", dreg, dreg, AT);
+ ADDRESS_ADD_INSN, "d,v,t", dreg, dreg, AT);
p = frag_var (rs_machine_dependent, 8 + adj, 0,
RELAX_ENCODE (24 + adj, 8 + adj,
as_bad (_("PIC code offset overflow (max 32 signed bits)"));
offset_expr.X_add_number = expr1.X_add_number;
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)",
- tempreg,
- (int) BFD_RELOC_MIPS_GOT_PAGE, mips_gp_register);
- macro_build (p + 4, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu", "t,r,j",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN, "t,o(b)",
+ tempreg, (int) BFD_RELOC_MIPS_GOT_PAGE,
+ mips_gp_register);
+ macro_build (p + 4, &icnt, &offset_expr, ADDRESS_ADDI_INSN, "t,r,j",
tempreg, tempreg, (int) BFD_RELOC_MIPS_GOT_OFST);
if (adj)
{
macro_build (p + 8, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", treg, tempreg, breg);
+ ADDRESS_ADD_INSN, "d,v,t", treg, tempreg, breg);
breg = 0;
tempreg = treg;
}
/* We use
addiu $tempreg,$gp,<sym> (BFD_RELOC_GPREL16)
*/
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu", "t,r,j",
- tempreg, mips_gp_register, (int) BFD_RELOC_GPREL16);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_ADDI_INSN,
+ "t,r,j", tempreg, mips_gp_register,
+ (int) BFD_RELOC_GPREL16);
}
else
abort ();
s = (dbl || HAVE_64BIT_ADDRESSES) ? "daddu" :
HAVE_NEWABI ? "add" : "addu";
else
- s = HAVE_64BIT_ADDRESSES ? "daddu" : HAVE_NEWABI ? "add" : "addu";
+ s = ADDRESS_ADD_INSN;
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, s,
"d,v,t", treg, tempreg, breg);
}
expr1.X_add_number = mips_cprestore_offset;
macro_build_ldst_constoffset ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- mips_gp_register, mips_frame_reg);
+ ADDRESS_LOAD_INSN,
+ mips_gp_register,
+ mips_frame_reg);
}
}
}
{
frag_grow (4);
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", PIC_CALL_REG,
+ ADDRESS_LOAD_INSN, "t,o(b)", PIC_CALL_REG,
(int) BFD_RELOC_MIPS_CALL16,
mips_gp_register);
frag_var (rs_machine_dependent, 0, 0,
"t,u", PIC_CALL_REG,
(int) BFD_RELOC_MIPS_CALL_HI16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", PIC_CALL_REG, PIC_CALL_REG,
- mips_gp_register);
+ ADDRESS_ADD_INSN, "d,v,t", PIC_CALL_REG,
+ PIC_CALL_REG, mips_gp_register);
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", PIC_CALL_REG,
+ ADDRESS_LOAD_INSN, "t,o(b)", PIC_CALL_REG,
(int) BFD_RELOC_MIPS_CALL_LO16, PIC_CALL_REG);
p = frag_var (rs_machine_dependent, 8, 0,
RELAX_ENCODE (12, 8, 0, 4, 0, 0),
offset_expr.X_add_symbol, 0, NULL);
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)",
- PIC_CALL_REG, (int) BFD_RELOC_MIPS_GOT_PAGE,
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
+ "t,o(b)", PIC_CALL_REG,
+ (int) BFD_RELOC_MIPS_GOT_PAGE,
mips_gp_register);
- macro_build (p + 4, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "addi" : "daddiu",
+ macro_build (p + 4, &icnt, &offset_expr, ADDRESS_ADDI_INSN,
"t,r,j", PIC_CALL_REG, PIC_CALL_REG,
(int) BFD_RELOC_MIPS_GOT_OFST);
}
if (! mips_big_got)
{
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", PIC_CALL_REG,
+ ADDRESS_LOAD_INSN, "t,o(b)", PIC_CALL_REG,
(int) BFD_RELOC_MIPS_CALL16, mips_gp_register);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
"nop", "");
"t,u", PIC_CALL_REG,
(int) BFD_RELOC_MIPS_CALL_HI16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", PIC_CALL_REG, PIC_CALL_REG,
- mips_gp_register);
+ ADDRESS_ADD_INSN, "d,v,t", PIC_CALL_REG,
+ PIC_CALL_REG, mips_gp_register);
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", PIC_CALL_REG,
+ ADDRESS_LOAD_INSN, "t,o(b)", PIC_CALL_REG,
(int) BFD_RELOC_MIPS_CALL_LO16, PIC_CALL_REG);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
"nop", "");
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
}
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", PIC_CALL_REG,
(int) BFD_RELOC_MIPS_GOT16, mips_gp_register);
p += 4;
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
}
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_ADDI_INSN,
"t,r,j", PIC_CALL_REG, PIC_CALL_REG,
(int) BFD_RELOC_LO16);
macro_build_jalr (icnt, &offset_expr);
"nop", "");
expr1.X_add_number = mips_cprestore_offset;
macro_build_ldst_constoffset ((char *) NULL, &icnt, &expr1,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- mips_gp_register, mips_frame_reg);
+ ADDRESS_LOAD_INSN,
+ mips_gp_register,
+ mips_frame_reg);
}
}
}
{
frag_grow (28);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", tempreg, breg, mips_gp_register);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, breg,
+ mips_gp_register);
macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt,
treg, (int) BFD_RELOC_GPREL16, tempreg);
p = frag_var (rs_machine_dependent, 12, 0,
macro_build_lui (p, &icnt, &offset_expr, tempreg);
if (p != NULL)
p += 4;
- macro_build (p, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
+ macro_build (p, &icnt, (expressionS *) NULL, ADDRESS_ADD_INSN,
"d,v,t", tempreg, tempreg, breg);
if (p != NULL)
p += 4;
if (HAVE_NEWABI)
{
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", tempreg, BFD_RELOC_MIPS_GOT_PAGE,
- mips_gp_register);
+ ADDRESS_LOAD_INSN, "t,o(b)", tempreg,
+ BFD_RELOC_MIPS_GOT_PAGE, mips_gp_register);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", tempreg, tempreg, breg);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg,
+ breg);
macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt, treg,
(int) BFD_RELOC_MIPS_GOT_OFST, tempreg);
|| expr1.X_add_number >= 0x8000)
as_bad (_("PIC code offset overflow (max 16 signed bits)"));
frag_grow (20);
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)", tempreg,
- (int) lw_reloc_type, mips_gp_register);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
+ "t,o(b)", tempreg, (int) lw_reloc_type,
+ mips_gp_register);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "");
p = frag_var (rs_machine_dependent, 4, 0,
RELAX_ENCODE (0, 4, -8, 0, 0, 0),
offset_expr.X_add_symbol, 0, NULL);
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", tempreg, tempreg, breg);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg, breg);
macro_build ((char *) NULL, &icnt, &expr1, s, fmt, treg,
(int) BFD_RELOC_LO16, tempreg);
}
macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u",
tempreg, (int) BFD_RELOC_MIPS_GOT_HI16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", tempreg, tempreg, mips_gp_register);
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg,
+ mips_gp_register);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT_LO16,
tempreg);
p = frag_var (rs_machine_dependent, 12 + gpdel, 0,
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
}
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT16,
mips_gp_register);
p += 4;
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_ADDI_INSN,
"t,r,j", tempreg, tempreg, (int) BFD_RELOC_LO16);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", tempreg, tempreg, breg);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg, breg);
macro_build ((char *) NULL, &icnt, &expr1, s, fmt, treg,
(int) BFD_RELOC_LO16, tempreg);
}
macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u",
tempreg, (int) BFD_RELOC_MIPS_GOT_HI16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", tempreg, tempreg, mips_gp_register);
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg,
+ mips_gp_register);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", tempreg, (int) BFD_RELOC_MIPS_GOT_LO16,
tempreg);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", tempreg, tempreg, breg);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg, breg);
macro_build ((char *) NULL, &icnt, &expr1, s, fmt, treg,
(int) BFD_RELOC_LO16, tempreg);
RELAX_ENCODE (16 + bregsz, 8 + bregsz,
0, 4 + bregsz, 0, 0),
offset_expr.X_add_symbol, 0, NULL);
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", tempreg,
- (int) BFD_RELOC_MIPS_GOT_PAGE,
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN, "t,o(b)",
+ tempreg, (int) BFD_RELOC_MIPS_GOT_PAGE,
mips_gp_register);
if (breg != 0)
macro_build (p + 4, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "add" : "daddu",
- "d,v,t", tempreg, tempreg, breg);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, tempreg, breg);
macro_build (p + 4 + bregsz, &icnt, &offset_expr, s, fmt, treg,
(int) BFD_RELOC_MIPS_GOT_OFST, tempreg);
}
else
{
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", tempreg, breg, mips_gp_register);
+ ADDRESS_ADD_INSN, "d,v,t", tempreg, breg,
+ mips_gp_register);
macro_build ((char *) NULL, &icnt, &offset_expr, s, fmt,
treg, (int) BFD_RELOC_GPREL16, tempreg);
}
}
else if (mips_pic == SVR4_PIC)
{
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", AT, (int) BFD_RELOC_MIPS_GOT16,
mips_gp_register);
}
{
/* For embedded PIC we pick up the entire address off $gp in
a single instruction. */
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "addiu" : "daddiu", "t,r,j", AT,
- mips_gp_register, (int) BFD_RELOC_GPREL16);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_ADDI_INSN,
+ "t,r,j", AT, mips_gp_register,
+ (int) BFD_RELOC_GPREL16);
offset_expr.X_op = O_constant;
offset_expr.X_add_number = 0;
}
assert (strcmp (s, RDATA_SECTION_NAME) == 0);
if (mips_pic == SVR4_PIC)
macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
- "t,o(b)", AT, (int) BFD_RELOC_MIPS_GOT16,
- mips_gp_register);
+ ADDRESS_LOAD_INSN, "t,o(b)", AT,
+ (int) BFD_RELOC_MIPS_GOT16, mips_gp_register);
else
{
/* FIXME: This won't work for a 64 bit address. */
{
frag_grow (36);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, breg, mips_gp_register);
+ ADDRESS_ADD_INSN, "d,v,t", AT, breg,
+ mips_gp_register);
tempreg = AT;
off = 4;
used_at = 1;
p += 4;
if (breg != 0)
{
- macro_build (p, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
+ macro_build (p, &icnt, (expressionS *) NULL, ADDRESS_ADD_INSN,
"d,v,t", AT, breg, AT);
if (p != NULL)
p += 4;
else
off = 4;
frag_grow (24 + off);
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld", "t,o(b)", AT,
- (int) BFD_RELOC_MIPS_GOT16, mips_gp_register);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
+ "t,o(b)", AT, (int) BFD_RELOC_MIPS_GOT16,
+ mips_gp_register);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "");
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, breg, AT);
+ ADDRESS_ADD_INSN, "d,v,t", AT, breg, AT);
/* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &expr1, s, fmt,
coproc ? treg + 1 : treg,
macro_build ((char *) NULL, &icnt, &offset_expr, "lui", "t,u",
AT, (int) BFD_RELOC_MIPS_GOT_HI16);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, AT, mips_gp_register);
- macro_build ((char *) NULL, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ ADDRESS_ADD_INSN, "d,v,t", AT, AT, mips_gp_register);
+ macro_build ((char *) NULL, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", AT, (int) BFD_RELOC_MIPS_GOT_LO16, AT);
macro_build ((char *) NULL, &icnt, (expressionS *) NULL, "nop", "");
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, breg, AT);
+ ADDRESS_ADD_INSN, "d,v,t", AT, breg, AT);
/* Itbl support may require additional care here. */
macro_build ((char *) NULL, &icnt, &expr1, s, fmt,
coproc ? treg + 1 : treg,
macro_build (p, &icnt, (expressionS *) NULL, "nop", "");
p += 4;
}
- macro_build (p, &icnt, &offset_expr,
- HAVE_32BIT_ADDRESSES ? "lw" : "ld",
+ macro_build (p, &icnt, &offset_expr, ADDRESS_LOAD_INSN,
"t,o(b)", AT, (int) BFD_RELOC_MIPS_GOT16,
mips_gp_register);
p += 4;
p += 4;
if (breg != 0)
{
- macro_build (p, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
+ macro_build (p, &icnt, (expressionS *) NULL, ADDRESS_ADD_INSN,
"d,v,t", AT, breg, AT);
p += 4;
}
else
{
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? "addu" : "daddu",
- "d,v,t", AT, breg, mips_gp_register);
+ ADDRESS_ADD_INSN, "d,v,t", AT, breg,
+ mips_gp_register);
tempreg = AT;
used_at = 1;
}
imm_expr.X_add_number = -imm_expr.X_add_number;
macro_build ((char *) NULL, &icnt, &imm_expr,
HAVE_32BIT_GPRS ? "addiu" : "daddiu",
- "t,r,j", dreg, sreg,
- (int) BFD_RELOC_LO16);
+ "t,r,j", dreg, sreg, (int) BFD_RELOC_LO16);
used_at = 0;
}
else
load_address (&icnt, AT, &offset_expr, &used_at);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", AT, AT, breg);
if (! target_big_endian)
expr1.X_add_number = off;
else
load_address (&icnt, AT, &offset_expr, &used_at);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", AT, AT, breg);
if (target_big_endian)
expr1.X_add_number = 0;
macro_build ((char *) NULL, &icnt, &expr1,
load_address (&icnt, AT, &offset_expr, &used_at);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", AT, AT, breg);
if (! target_big_endian)
expr1.X_add_number = off;
else
load_address (&icnt, AT, &offset_expr, &used_at);
if (breg != 0)
macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI
- ? "add" : "addu" : "daddu",
- "d,v,t", AT, AT, breg);
+ ADDRESS_ADD_INSN, "d,v,t", AT, AT, breg);
if (! target_big_endian)
expr1.X_add_number = 0;
macro_build ((char *) NULL, &icnt, &expr1, "sb", "t,o(b)", treg,
fix_new (frag_now, f - frag_now->fr_literal,
4, NULL, 0, 0, BFD_RELOC_LO16);
- macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_64BIT_ADDRESSES ? "daddu" : "add", "d,v,t",
- mips_gp_register, mips_gp_register, reg1);
+ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, ADDRESS_ADD_INSN,
+ "d,v,t", mips_gp_register, mips_gp_register, reg1);
demand_empty_rest_of_line ();
}
ex.X_op_symbol = NULL;
ex.X_add_number = mips_cprestore_offset;
- macro_build_ldst_constoffset ((char *) NULL, &icnt, &ex,
- HAVE_32BIT_ADDRESSES ? "sw" : "sd",
+ macro_build_ldst_constoffset ((char *) NULL, &icnt, &ex, ADDRESS_STORE_INSN,
mips_gp_register, mips_frame_reg);
demand_empty_rest_of_line ();
/* Add $gp to the register named as an argument. */
reg = tc_get_register (0);
- macro_build ((char *) NULL, &icnt, (expressionS *) NULL,
- HAVE_32BIT_ADDRESSES ? HAVE_NEWABI ? "add" : "addu" : "daddu",
+ macro_build ((char *) NULL, &icnt, (expressionS *) NULL, ADDRESS_ADD_INSN,
"d,v,t", reg, reg, mips_gp_register);
demand_empty_rest_of_line ();