aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-07-07 09:41:04 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2013-07-07 09:41:04 +0000
commite76ff5abe375e1e7535f7827db01bce70bc9710d (patch)
tree258d8a6afed199e45671cb834a96d2c28f66af79 /opcodes
parentfa7616a4c7661cf786f3eaa9282072ca5dd8099c (diff)
downloadgdb-e76ff5abe375e1e7535f7827db01bce70bc9710d.zip
gdb-e76ff5abe375e1e7535f7827db01bce70bc9710d.tar.gz
gdb-e76ff5abe375e1e7535f7827db01bce70bc9710d.tar.bz2
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".
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog13
-rw-r--r--opcodes/micromips-opc.c6
-rw-r--r--opcodes/mips-dis.c15
3 files changed, 21 insertions, 13 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 0e3ee0f..8b10771 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,5 +1,18 @@
2013-07-07 Richard Sandiford <rdsandiford@googlemail.com>
+ * 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".
+
+2013-07-07 Richard Sandiford <rdsandiford@googlemail.com>
+
* mips-opc.c (mips_builtin_opcodes): Remove "+D" and "+T" entries.
* micromips-opc.c (micromips_opcodes): Likewise.
* mips-dis.c (print_insn_args, print_insn_micromips): Remove "+D"
diff --git a/opcodes/micromips-opc.c b/opcodes/micromips-opc.c
index 64caf8a..9a9a32c 100644
--- a/opcodes/micromips-opc.c
+++ b/opcodes/micromips-opc.c
@@ -42,7 +42,7 @@
#define RD_mf INSN2_MOD_GPR_MF
#define WR_mf INSN2_MOD_GPR_MF
#define RD_mg INSN2_READ_GPR_MG
-#define WR_mhi INSN2_WRITE_GPR_MHI
+#define WR_mh INSN2_WRITE_GPR_MH
#define RD_mj INSN2_READ_GPR_MJ
#define WR_mj INSN2_WRITE_GPR_MJ
#define RD_ml RD_mc /* Reuse, since the bit position is the same. */
@@ -703,10 +703,10 @@ const struct mips_opcode micromips_opcodes[] =
{"mov.d", "T,S", 0x5400207b, 0xfc00ffff, WR_T|RD_S|FP_D, 0, I1 },
{"mov.s", "T,S", 0x5400007b, 0xfc00ffff, WR_T|RD_S|FP_S, 0, I1 },
{"mov.ps", "T,S", 0x5400407b, 0xfc00ffff, WR_T|RD_S|FP_D, 0, I1 },
-{"movep", "mh,mi,mm,mn", 0x8400, 0xfc01, NODS, WR_mhi|RD_mmn, I1 },
+{"movep", "mh,mm,mn", 0x8400, 0xfc01, NODS, WR_mh|RD_mmn, I1 },
/* This macro is after the real instruction so that it only matches with
-minsn32. */
-{"movep", "mh,mi,mm,mn", 0, (int) M_MOVEP, INSN_MACRO, 0, I1 },
+{"movep", "mh,mm,mn", 0, (int) M_MOVEP, INSN_MACRO, 0, I1 },
{"movf", "t,s,M", 0x5400017b, 0xfc001fff, WR_t|RD_s|RD_CC|FP_S|FP_D, 0, I1 },
{"movf.d", "T,S,M", 0x54000220, 0xfc001fff, WR_T|RD_S|RD_CC|FP_D, 0, I1 },
{"movf.s", "T,S,M", 0x54000020, 0xfc001fff, WR_T|RD_S|RD_CC|FP_S, 0, I1 },
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index 333d4fe..4d89220 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -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':