* config/tc-mips.c (macro) <M_S_DOB>: Fix the placement of code.

This commit is contained in:
Maciej W. Rozycki 2010-12-09 22:56:46 +00:00
parent 88320db2f7
commit c4a68bea7a
2 changed files with 15 additions and 11 deletions

View file

@ -1,3 +1,7 @@
2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (macro) <M_S_DOB>: Fix the placement of code.
2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
* config/tc-mips.c (mips_ip) <'u'>: Report the value of the LUI

View file

@ -7062,6 +7062,17 @@ macro (struct mips_cl_insn *ip)
target_big_endian ? treg : treg + 1, r, breg);
break;
case M_S_DOB:
gas_assert (mips_opts.isa == ISA_MIPS1);
/* Even on a big endian machine $fn comes before $fn+1. We have
to adjust when storing to memory. */
macro_build (&offset_expr, "swc1", "T,o(b)",
target_big_endian ? treg + 1 : treg, BFD_RELOC_LO16, breg);
offset_expr.X_add_number += 4;
macro_build (&offset_expr, "swc1", "T,o(b)",
target_big_endian ? treg : treg + 1, BFD_RELOC_LO16, breg);
break;
case M_L_DAB:
/*
* The MIPS assembler seems to check for X_add_number not
@ -7666,17 +7677,6 @@ macro (struct mips_cl_insn *ip)
}
break;
case M_S_DOB:
gas_assert (mips_opts.isa == ISA_MIPS1);
/* Even on a big endian machine $fn comes before $fn+1. We have
to adjust when storing to memory. */
macro_build (&offset_expr, "swc1", "T,o(b)",
target_big_endian ? treg + 1 : treg, BFD_RELOC_LO16, breg);
offset_expr.X_add_number += 4;
macro_build (&offset_expr, "swc1", "T,o(b)",
target_big_endian ? treg : treg + 1, BFD_RELOC_LO16, breg);
break;
case M_SEQ:
if (sreg == 0)
macro_build (&expr1, "sltiu", "t,r,j", dreg, treg, BFD_RELOC_LO16);