include/opcode/

* mips.h: Remove "mi" documentation.  Update "mh" documentation.
	(OP_MASK_MI, OP_SH_MI, MICROMIPSOP_MASK_MI, MICROMIPSOP_MASK_MI):
	Delete.
	(INSN2_WRITE_GPR_MHI): Rename to...
	(INSN2_WRITE_GPR_MH): ...this.

opcodes/
	* micromips-opc.c (WR_mhi): Rename to..
	(WR_mh): ...this.
	(micromips_opcodes): Update "movep" entry accordingly.  Replace
	"mh,mi" with "mh".
	* mips-dis.c (micromips_to_32_reg_h_map): Rename to...
	(micromips_to_32_reg_h_map1): ...this.
	(micromips_to_32_reg_i_map): Rename to...
	(micromips_to_32_reg_h_map2): ...this.
	(print_micromips_insn): Remove "mi" case.  Print both registers
	in the pair for "mh".

gas/
	* config/tc-mips.c (mips32_to_micromips_reg_h_map): Delete.
	(micromips_to_32_reg_h_map): Rename to...
	(micromips_to_32_reg_h_map1): ...this.
	(micromips_to_32_reg_i_map): Rename to...
	(micromips_to_32_reg_h_map2): ...this.
	(mips_lookup_reg_pair): New function.
	(gpr_write_mask, macro): Adjust after above renaming.
	(validate_micromips_insn): Remove "mi" handling.
	(mips_ip): Likewise.  Parse both registers in a pair for "mh".
This commit is contained in:
Richard Sandiford
2013-07-07 09:41:04 +00:00
parent fa7616a4c7
commit e76ff5abe3
7 changed files with 89 additions and 86 deletions

View File

@@ -76,13 +76,11 @@ static const unsigned int mips16_to_32_reg_map[] =
#define micromips_to_32_reg_g_map mips16_to_32_reg_map
/* The microMIPS registers with type h. */
static const unsigned int micromips_to_32_reg_h_map[] =
static const unsigned int micromips_to_32_reg_h_map1[] =
{
5, 5, 6, 4, 4, 4, 4, 4
};
/* The microMIPS registers with type i. */
static const unsigned int micromips_to_32_reg_i_map[] =
static const unsigned int micromips_to_32_reg_h_map2[] =
{
6, 7, 7, 21, 22, 5, 6, 7
};
@@ -2716,13 +2714,10 @@ print_insn_micromips (bfd_vma memaddr, struct disassemble_info *info)
break;
case 'h':
regno = micromips_to_32_reg_h_map[GET_OP (insn, MH)];
infprintf (is, "%s", mips_gpr_names[regno]);
break;
case 'i':
regno = micromips_to_32_reg_i_map[GET_OP (insn, MI)];
regno = micromips_to_32_reg_h_map1[GET_OP (insn, MH)];
infprintf (is, "%s", mips_gpr_names[regno]);
regno = micromips_to_32_reg_h_map2[GET_OP (insn, MH)];
infprintf (is, ",%s", mips_gpr_names[regno]);
break;
case 'j':