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.
This commit is contained in:
Maciej W. Rozycki 2012-07-31 21:38:54 +00:00
parent 33fee3c9c6
commit 03f66e8a8f
15 changed files with 686 additions and 120 deletions

View file

@ -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;