aboutsummaryrefslogtreecommitdiff
path: root/opcodes/mips-opc.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-08-19 18:57:00 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2013-08-19 18:57:00 +0000
commit0f35dbc4d98da6b1e251ac8148a9d20d6276012b (patch)
tree6e4202d87d72f88053a4d5e51f72bac84de20836 /opcodes/mips-opc.c
parent33b60d58316e0ce994c009e1a9bede277538b69e (diff)
downloadgdb-0f35dbc4d98da6b1e251ac8148a9d20d6276012b.zip
gdb-0f35dbc4d98da6b1e251ac8148a9d20d6276012b.tar.gz
gdb-0f35dbc4d98da6b1e251ac8148a9d20d6276012b.tar.bz2
include/opcode/
* mips.h (OP_OPTIONAL_REG): New mips_operand_type. (mips_optional_operand_p): New function. opcodes/ * mips-formats.h (OPTIONAL_REG, OPTIONAL_MAPPED_REG): New macros. * micromips-opc.c (decode_micromips_operand): Use OPTIONAL_REG and OPTIONAL_MAPPED_REG. * mips-opc.c (decode_mips_operand): Likewise. * mips16-opc.c (decode_mips16_operand): Likewise. * mips-dis.c (print_insn_arg): Handle OP_OPTIONAL_REG. gas/ * config/tc-mips.c (operand_reg_mask, match_operand): Handle OP_OPTIONAL_REG. (mips_ip, mips16_ip): Use mips_optional_operand_p to check for optional operands.
Diffstat (limited to 'opcodes/mips-opc.c')
-rw-r--r--opcodes/mips-opc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index feb96a5..7fdc938 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -134,8 +134,8 @@ decode_mips_operand (const char *p)
case 'S': REG (5, 11, FP);
case 'T': REG (5, 16, FP);
case 'U': SPECIAL (10, 11, CLO_CLZ_DEST);
- case 'V': REG (5, 11, FP);
- case 'W': REG (5, 16, FP);
+ case 'V': OPTIONAL_REG (5, 11, FP);
+ case 'W': OPTIONAL_REG (5, 16, FP);
case 'X': REG (5, 6, VEC);
case 'Y': REG (5, 11, VEC);
case 'Z': REG (5, 16, VEC);
@@ -153,12 +153,12 @@ decode_mips_operand (const char *p)
case 'o': SINT (16, 0);
case 'p': BRANCH (16, 0, 2);
case 'q': HINT (10, 6);
- case 'r': REG (5, 21, GP);
+ case 'r': OPTIONAL_REG (5, 21, GP);
case 's': REG (5, 21, GP);
case 't': REG (5, 16, GP);
case 'u': HINT (16, 0);
- case 'v': REG (5, 21, GP);
- case 'w': REG (5, 16, GP);
+ case 'v': OPTIONAL_REG (5, 21, GP);
+ case 'w': OPTIONAL_REG (5, 16, GP);
case 'x': REG (0, 0, GP);
case 'z': MAPPED_REG (0, 0, GP, reg_0_map);
}