diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-08-03 10:41:13 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-08-03 10:41:13 +0000 |
commit | 0acfaea6cd192fce727369cdcede034410a5a1da (patch) | |
tree | bbf62ba2dea5f7cfd3e577c0fba24f0761d0a6ae /gas/config/tc-mips.c | |
parent | 18342312e13a1a0b9fb54dc344abad6a4f08ef69 (diff) | |
download | gdb-0acfaea6cd192fce727369cdcede034410a5a1da.zip gdb-0acfaea6cd192fce727369cdcede034410a5a1da.tar.gz gdb-0acfaea6cd192fce727369cdcede034410a5a1da.tar.bz2 |
gas/
* config/tc-mips.c (mips16_macro): Don't use move_register.
(mips16_ip): Allow macros to use 'p'.
gas/testsuite/
* gas/mips/mips16-macro.s, gas/mips/mips16-macro.d: New test.
* gas/mips/mips.exp: Run it.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 79c99ab..bdfcc3a 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -12060,10 +12060,11 @@ mips16_macro (struct mips_cl_insn *ip) expr1.X_add_number = 0; macro_build (&expr1, "slti", "x,8", yreg); if (xreg != yreg) - move_register (xreg, yreg); + macro_build (NULL, "move", "y,X", xreg, mips16_to_32_reg_map[yreg]); expr1.X_add_number = 2; macro_build (&expr1, "bteqz", "p"); macro_build (NULL, "neg", "x,w", xreg, xreg); + break; } } @@ -12680,7 +12681,7 @@ mips16_ip (char *str, struct mips_cl_insn *ip) we can. */ if (insn->pinfo == INSN_MACRO) { - gas_assert (relax_char == 0); + gas_assert (relax_char == 0 || relax_char == 'p'); gas_assert (*offset_reloc == BFD_RELOC_UNUSED); } else if (relax_char |