summaryrefslogtreecommitdiff
path: root/opcodes/mips-dis.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2010-12-18 11:14:12 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2010-12-18 11:14:12 +0000
commit44b85bcd76fb4570e335da26a40532d5009ea790 (patch)
treeb05f00944f0c1e359a21a193190934f506961114 /opcodes/mips-dis.c
parent020202cc3ec9b630d27e9389412576893e40e7e7 (diff)
downloadbinutils-redhat-44b85bcd76fb4570e335da26a40532d5009ea790.tar.gz
include/opcode/
2010-12-14 Mingjie Xing <mingjie.xing@gmail.com> * mips.h (OP_*_OFFSET_A, OP_*_OFFSET_B, OP_*_OFFSET_C) (OP_*_RZ, OP_*_FZ, INSN2_M_FP_D, INSN2_WRITE_GPR_Z, INSN2_WRITE_FPR_Z) (INSN2_READ_GPR_Z, INSN2_READ_FPR_Z, INSN2_READ_GPR_D): Define. opcodes/ 2010-12-14 Mingjie Xing <mingjie.xing@gmail.com> * mips-opc.c (WR_z, WR_Z, RD_z, RD_Z, RD_d): Define. (mips_builtin_opcodes): Add loongson3a specific instructions. * mips-dis.c (print_insn_args): Handle the new arguments +a|b|c|z|Z. gas/ 2010-12-14 Mingjie Xing <mingjie.xing@gmail.com> * config/tc-mips.c (insn_uses_reg): Handle the new flags INSN2_READ_FPR_Z, INSN2_READ_GPR_D and INSN2_READ_GPR_Z. (append_insn): Handle delay-slot filling for the new flags. (validate_mips_insn): Handle the new arguments +a|b|c|z|Z. (mips_ip): Handle the new arguments +a|b|c|z|Z. gas/testsuite/ 2010-12-14 Mingjie Xing <mingjie.xing@gmail.com> * gas/mips/loongson-3a-2.s, gas/mips/loongson-3a-2.d, gas/mips/loongson-3a-3.s, gas/mips/loongson-3a-3.d: New tests. * gas/mips/mips.exp: Run them.
Diffstat (limited to 'opcodes/mips-dis.c')
-rw-r--r--opcodes/mips-dis.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index a528e9650e..ca65d71f59 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -973,6 +973,37 @@ print_insn_args (const char *d,
(*info->fprintf_func) (info->stream, "%d", op);
break;
+ case 'a': /* 8-bit signed offset in bit 6 */
+ delta = (l >> OP_SH_OFFSET_A) & OP_MASK_OFFSET_A;
+ if (delta & 0x80)
+ delta |= ~OP_MASK_OFFSET_A;
+ (*info->fprintf_func) (info->stream, "%d", delta);
+ break;
+
+ case 'b': /* 8-bit signed offset in bit 3 */
+ delta = (l >> OP_SH_OFFSET_B) & OP_MASK_OFFSET_B;
+ if (delta & 0x80)
+ delta |= ~OP_MASK_OFFSET_B;
+ (*info->fprintf_func) (info->stream, "%d", delta);
+ break;
+
+ case 'c': /* 9-bit signed offset in bit 6 */
+ delta = (l >> OP_SH_OFFSET_C) & OP_MASK_OFFSET_C;
+ if (delta & 0x100)
+ delta |= ~OP_MASK_OFFSET_C;
+ (*info->fprintf_func) (info->stream, "%d", delta);
+ break;
+
+ case 'z':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_gpr_names[(l >> OP_SH_RZ) & OP_MASK_RZ]);
+ break;
+
+ case 'Z':
+ (*info->fprintf_func) (info->stream, "%s",
+ mips_fpr_names[(l >> OP_SH_FZ) & OP_MASK_FZ]);
+ break;
+
default:
/* xgettext:c-format */
(*info->fprintf_func) (info->stream,