From: Thiemo Seufer Date: Fri, 28 Apr 2006 11:42:28 +0000 (+0000) Subject: * opcodes/mips-dis.c (mips16_to_32_reg_map, mips16_reg_names): X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=654c225a6d81aaf232f05158943aee3fa798c4f2;p=binutils-gdb.git * opcodes/mips-dis.c (mips16_to_32_reg_map, mips16_reg_names): Map MIPS16 registers to O32 names. (print_mips16_insn_arg): Use mips16_reg_names. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 23e030435d7..35d9a3d1434 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2006-04-28 Thiemo Seufer + Nigel Stevens + + * opcodes/mips-dis.c (mips16_to_32_reg_map, mips16_reg_names): + Map MIPS16 registers to O32 names. + (print_mips16_insn_arg): Use mips16_reg_names. + 2006-04-26 Julian Brown * arm-dis.c (print_insn_neon): Disassemble floating-point constant diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c index 9a48d86d2d1..5001f06ac40 100644 --- a/opcodes/mips-dis.c +++ b/opcodes/mips-dis.c @@ -51,12 +51,15 @@ struct mips_cp0sel_name const char * const name; }; -/* The mips16 register names. */ -static const char * const mips16_reg_names[] = +/* The mips16 registers. */ +static const unsigned int mips16_to_32_reg_map[] = { - "s0", "s1", "v0", "v1", "a0", "a1", "a2", "a3" + 16, 17, 2, 3, 4, 5, 6, 7 }; +#define mips16_reg_names(rn) mips_gpr_names[mips16_to_32_reg_map[rn]] + + static const char * const mips_gpr_names_numeric[32] = { "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7", @@ -1283,27 +1286,27 @@ print_mips16_insn_arg (char type, case 'y': case 'w': (*info->fprintf_func) (info->stream, "%s", - mips16_reg_names[((l >> MIPS16OP_SH_RY) - & MIPS16OP_MASK_RY)]); + mips16_reg_names(((l >> MIPS16OP_SH_RY) + & MIPS16OP_MASK_RY))); break; case 'x': case 'v': (*info->fprintf_func) (info->stream, "%s", - mips16_reg_names[((l >> MIPS16OP_SH_RX) - & MIPS16OP_MASK_RX)]); + mips16_reg_names(((l >> MIPS16OP_SH_RX) + & MIPS16OP_MASK_RX))); break; case 'z': (*info->fprintf_func) (info->stream, "%s", - mips16_reg_names[((l >> MIPS16OP_SH_RZ) - & MIPS16OP_MASK_RZ)]); + mips16_reg_names(((l >> MIPS16OP_SH_RZ) + & MIPS16OP_MASK_RZ))); break; case 'Z': (*info->fprintf_func) (info->stream, "%s", - mips16_reg_names[((l >> MIPS16OP_SH_MOVE32Z) - & MIPS16OP_MASK_MOVE32Z)]); + mips16_reg_names(((l >> MIPS16OP_SH_MOVE32Z) + & MIPS16OP_MASK_MOVE32Z))); break; case '0':