aboutsummaryrefslogtreecommitdiff
path: root/opcodes/mips16-opc.c
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2013-08-03 10:49:48 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2013-08-03 10:49:48 +0000
commit3ccad066ac853353fb20d9bf2993107dda242801 (patch)
tree50222c01bc5d4e226cc9b32442b1be3215278165 /opcodes/mips16-opc.c
parent0acfaea6cd192fce727369cdcede034410a5a1da (diff)
downloadgdb-3ccad066ac853353fb20d9bf2993107dda242801.zip
gdb-3ccad066ac853353fb20d9bf2993107dda242801.tar.gz
gdb-3ccad066ac853353fb20d9bf2993107dda242801.tar.bz2
include/opcode/
* mips.h (mips_pcrel_operand): Inherit from mips_int_operand. (mips_int_operand_min, mips_int_operand_max): New functions. (mips_decode_pcrel_operand): Use mips_decode_int_operand. opcodes/ * mips-formats.h (PCREL): Reorder parameters and update the definition to match new mips_pcrel_operand layout. (JUMP, JALX, BRANCH): Update accordingly. * mips16-opc.c (decode_mips16_operand): Likewise. gas/ * config/tc-mips.c (match_int_operand): Use mips_int_operand_min and mips_int_operand_max. (mips16_immed_operand, mips16_immed_operands, MIPS16_NUM_IMMED): Delete. (mips16_immed_operand, mips16_immed_in_range_p): New functions. (mips16_immed, mips16_extended_frag): Use them. Use mips_int_operand instead of mips16_immed_operand.
Diffstat (limited to 'opcodes/mips16-opc.c')
-rw-r--r--opcodes/mips16-opc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/opcodes/mips16-opc.c b/opcodes/mips16-opc.c
index f386962..9948741 100644
--- a/opcodes/mips16-opc.c
+++ b/opcodes/mips16-opc.c
@@ -86,11 +86,11 @@ decode_mips16_operand (char type, bfd_boolean extended_p)
case '6': SINT (16, 0);
case '8': SINT (16, 0);
- case 'A': PCREL (16, 0, 2, 0, TRUE, FALSE, FALSE);
- case 'B': PCREL (16, 0, 3, 0, TRUE, FALSE, FALSE);
+ case 'A': PCREL (16, 0, TRUE, 0, 2, FALSE, FALSE);
+ case 'B': PCREL (16, 0, TRUE, 0, 3, FALSE, FALSE);
case 'C': SINT (16, 0);
case 'D': SINT (16, 0);
- case 'E': PCREL (16, 0, 2, 0, TRUE, FALSE, FALSE);
+ case 'E': PCREL (16, 0, TRUE, 0, 2, FALSE, FALSE);
case 'H': SINT (16, 0);
case 'K': SINT (16, 0);
case 'U': UINT (16, 0);
@@ -115,11 +115,11 @@ decode_mips16_operand (char type, bfd_boolean extended_p)
case '6': UINT (6, 5);
case '8': UINT (8, 0);
- case 'A': PCREL (8, 0, 2, 2, FALSE, FALSE, FALSE);
- case 'B': PCREL (5, 0, 3, 3, FALSE, FALSE, FALSE);
+ case 'A': PCREL (8, 0, FALSE, 2, 2, FALSE, FALSE);
+ case 'B': PCREL (5, 0, FALSE, 3, 3, FALSE, FALSE);
case 'C': INT_ADJ (8, 0, 255, 3, FALSE); /* (0 .. 255) << 3 */
case 'D': INT_ADJ (5, 0, 31, 3, FALSE); /* (0 .. 31) << 3 */
- case 'E': PCREL (5, 0, 2, 2, FALSE, FALSE, FALSE);
+ case 'E': PCREL (5, 0, FALSE, 2, 2, FALSE, FALSE);
case 'H': INT_ADJ (5, 0, 31, 1, FALSE); /* (0 .. 31) << 1 */
case 'K': INT_ADJ (8, 0, 127, 3, FALSE); /* (-128 .. 127) << 3 */
case 'U': UINT (8, 0);