diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-08-19 19:54:41 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-08-19 19:54:41 +0000 |
commit | 5e0dc5bae9dbbbcbd4156cafc941d3f984bfc792 (patch) | |
tree | 02a4eb07383caa751dea04d230cd6c456d3550c8 /gas/config/tc-mips.c | |
parent | 60f20e8ba8a846a278c11cedc1329486721ff01b (diff) | |
download | gdb-5e0dc5bae9dbbbcbd4156cafc941d3f984bfc792.zip gdb-5e0dc5bae9dbbbcbd4156cafc941d3f984bfc792.tar.gz gdb-5e0dc5bae9dbbbcbd4156cafc941d3f984bfc792.tar.bz2 |
include/opcode/
* mips.h (M_DEXT, M_DINS): Delete.
opcodes/
* micromips-opc.c (micromips_opcodes): Replace "dext" and "dins"
macro entries with "dextm", "dextu", "dinsm" and "dinsu" aliases.
Use +H rather than +C for the real "dext".
* mips-opc.c (mips_builtin_opcodes): Likewise.
gas/
* config/tc-mips.c (report_bad_range, report_bad_field): Delete.
(macro): Remove M_DEXT and M_DINS handling.
gas/testsuite/
* gas/mips/ext-ill.l, gas/mips/mips64r2-ill.l: Expect DEXT and DINS
error messages to have the same form as the EXT and INS ones.
* gas/mips/micromips-insn32.d, gas/mips/micromips-noinsn32.d,
gas/mips/micromips-trap.d, gas/mips/micromips.d,
gas/mips/micromips@mips64r2.d, gas/mips/mips64r2.d: Expect
"dext" and "dins" instead of "dextm", "dextu", "dinsm" and "dinsu".
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 4aa2493..f2c6768 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -4211,39 +4211,6 @@ mips_oddfpreg_ok (const struct mips_opcode *insn, int opnum) return FALSE; } -/* Report that user-supplied argument ARGNUM for INSN was VAL, but should - have been in the range [MIN_VAL, MAX_VAL]. PRINT_HEX says whether - this operand is normally printed in hex or decimal. */ - -static void -report_bad_range (struct mips_cl_insn *insn, int argnum, - offsetT val, int min_val, int max_val, - bfd_boolean print_hex) -{ - if (print_hex && val >= 0) - as_bad (_("Operand %d of `%s' must be in the range [0x%x, 0x%x]," - " was 0x%lx."), - argnum, insn->insn_mo->name, min_val, max_val, (unsigned long) val); - else if (print_hex) - as_bad (_("Operand %d of `%s' must be in the range [0x%x, 0x%x]," - " was %ld."), - argnum, insn->insn_mo->name, min_val, max_val, (unsigned long) val); - else - as_bad (_("Operand %d of `%s' must be in the range [%d, %d]," - " was %ld."), - argnum, insn->insn_mo->name, min_val, max_val, (unsigned long) val); -} - -/* Report an invalid combination of position and size operands for a bitfield - operation. POS and SIZE are the values that were given. */ - -static void -report_bad_field (offsetT pos, offsetT size) -{ - as_bad (_("Invalid field specification (position %ld, size %ld)"), - (unsigned long) pos, (unsigned long) size); -} - /* Information about an instruction argument that we're trying to match. */ struct mips_arg_info { @@ -9515,102 +9482,6 @@ macro (struct mips_cl_insn *ip, char *str) } break; - case M_DEXT: - { - /* Use unsigned arithmetic. */ - addressT pos; - addressT size; - - if (imm_expr.X_op != O_constant || imm2_expr.X_op != O_constant) - { - as_bad (_("Unsupported large constant")); - pos = size = 1; - } - else - { - pos = imm_expr.X_add_number; - size = imm2_expr.X_add_number; - } - - if (pos > 63) - { - report_bad_range (ip, 3, pos, 0, 63, FALSE); - pos = 1; - } - if (size == 0 || size > 64 || (pos + size - 1) > 63) - { - report_bad_field (pos, size); - size = 1; - } - - if (size <= 32 && pos < 32) - { - s = "dext"; - fmt = "t,r,+A,+C"; - } - else if (size <= 32) - { - s = "dextu"; - fmt = "t,r,+E,+H"; - } - else - { - s = "dextm"; - fmt = "t,r,+A,+G"; - } - macro_build ((expressionS *) NULL, s, fmt, op[0], op[1], (int) pos, - (int) (size - 1)); - } - break; - - case M_DINS: - { - /* Use unsigned arithmetic. */ - addressT pos; - addressT size; - - if (imm_expr.X_op != O_constant || imm2_expr.X_op != O_constant) - { - as_bad (_("Unsupported large constant")); - pos = size = 1; - } - else - { - pos = imm_expr.X_add_number; - size = imm2_expr.X_add_number; - } - - if (pos > 63) - { - report_bad_range (ip, 3, pos, 0, 63, FALSE); - pos = 1; - } - if (size == 0 || size > 64 || (pos + size - 1) > 63) - { - report_bad_field (pos, size); - size = 1; - } - - if (pos < 32 && (pos + size - 1) < 32) - { - s = "dins"; - fmt = "t,r,+A,+B"; - } - else if (pos >= 32) - { - s = "dinsu"; - fmt = "t,r,+E,+F"; - } - else - { - s = "dinsm"; - fmt = "t,r,+A,+F"; - } - macro_build ((expressionS *) NULL, s, fmt, op[0], op[1], (int) pos, - (int) (pos + size - 1)); - } - break; - case M_DDIV_3: dbl = 1; case M_DIV_3: |