summaryrefslogtreecommitdiff
path: root/opcodes/mips-dis.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-07-31 21:38:54 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-07-31 21:38:54 +0000
commit03f66e8a8f77e2df4ecdc9b32bcc96ab5cb0e85e (patch)
tree43c7deebce70b9219edc9a020fe1a9bfbd086a41 /opcodes/mips-dis.c
parent33fee3c9c6498755cc187bc912a9e69de5fd9e7d (diff)
downloadbinutils-gdb-03f66e8a8f77e2df4ecdc9b32bcc96ab5cb0e85e.tar.gz
include/opcode/
* mips.h: Document microMIPS DSP ASE usage. (MICROMIPSOP_MASK_DSPACC, MICROMIPSOP_SH_DSPACC): Update for microMIPS DSP ASE support. (MICROMIPSOP_MASK_DSPSFT, MICROMIPSOP_SH_DSPSFT): Likewise. (MICROMIPSOP_MASK_SA3, MICROMIPSOP_SH_SA3): Likewise. (MICROMIPSOP_MASK_SA4, MICROMIPSOP_SH_SA4): Likewise. (MICROMIPSOP_MASK_IMM8, MICROMIPSOP_SH_IMM8): Likewise. (MICROMIPSOP_MASK_IMM10, MICROMIPSOP_SH_IMM10): Likewise. (MICROMIPSOP_MASK_WRDSP, MICROMIPSOP_SH_WRDSP): Likewise. (MICROMIPSOP_MASK_BP, MICROMIPSOP_SH_BP): Likewise. gas/ * config/tc-mips.c (macro_build) <'2'>: Handle microMIPS. (macro) <M_BALIGN>: Update error handling. (validate_micromips_insn) <'2', '3', '4', '5', '6'>: New cases. <'7', '8', '0', '@', '^'>: Likewise. (mips_ip) <'2', '3', '4', '5', '6', '7', '8'>: Handle microMIPS. <'9'>: Fix formatting. <'0', '@'>: Handle microMIPS. <'^'>: New case. gas/testsuite/ * gas/mips/micromips@mips32-dsp.d: New. * gas/mips/micromips@mips32-dspr2.d: New. * gas/mips/mips32-dsp.d: Remove -mips32r2. * gas/mips/mips32-dspr2.d: Likewise. * gas/mips/mips.exp: (mips_create_arch): Use -mips64r2 for micromips. Use run_dump_test_arches to run dsp tests. opcodes/ * micromips-opc.c (WR_a, RD_a, MOD_a): New macros. (DSP_VOLA): Likewise. (D32, D33): Likewise. (micromips_opcodes): Add DSP ASE instructions. * micromips-dis.c (print_insn_micromips) <'2', '3'>: New cases. <'4', '5', '6', '7', '8', '0', '^', '@'>: Likewise.
Diffstat (limited to 'opcodes/mips-dis.c')
-rw-r--r--opcodes/mips-dis.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 8990db85fb9..ace65a588c3 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -2411,6 +2411,39 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
infprintf (is, "0x%x", GET_OP (insn, STYPE));
break;
+ case '2':
+ infprintf (is, "0x%lx", GET_OP (insn, BP));
+ break;
+
+ case '3':
+ infprintf (is, "0x%lx", GET_OP (insn, SA3));
+ break;
+
+ case '4':
+ infprintf (is, "0x%lx", GET_OP (insn, SA4));
+ break;
+
+ case '5':
+ infprintf (is, "0x%lx", GET_OP (insn, IMM8));
+ break;
+
+ case '6':
+ infprintf (is, "0x%lx", GET_OP (insn, RS));
+ break;
+
+ case '7':
+ infprintf (is, "$ac%ld", GET_OP (insn, DSPACC));
+ break;
+
+ case '8':
+ infprintf (is, "0x%lx", GET_OP (insn, WRDSP));
+ break;
+
+ case '0': /* DSP 6-bit signed immediate in bit 16. */
+ delta = (GET_OP (insn, DSPSFT) ^ 0x20) - 0x20;
+ infprintf (is, "%d", delta);
+ break;
+
case '<':
infprintf (is, "0x%x", GET_OP (insn, SHAMT));
break;
@@ -2419,6 +2452,10 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
infprintf (is, "0x%x", GET_OP (insn, 3BITPOS));
break;
+ case '^':
+ infprintf (is, "0x%lx", GET_OP (insn, RD));
+ break;
+
case '|':
infprintf (is, "0x%x", GET_OP (insn, TRAP));
break;
@@ -2535,6 +2572,11 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
infprintf (is, "%s", mips_gpr_names[0]);
break;
+ case '@': /* DSP 10-bit signed immediate in bit 16. */
+ delta = (GET_OP (insn, IMM10) ^ 0x200) - 0x200;
+ infprintf (is, "%d", delta);
+ break;
+
case 'B':
infprintf (is, "0x%x", GET_OP (insn, CODE10));
break;