diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-07-07 10:00:43 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-07-07 10:00:43 +0000 |
commit | 23e69e47b4cb274e848e0f06e240cdf43b8e0a69 (patch) | |
tree | 64d09f5759d5465030d9de37881eb0fd2a728404 /gas | |
parent | 27c5c572c911ec2f77bab953586870919db15a29 (diff) | |
download | gdb-23e69e47b4cb274e848e0f06e240cdf43b8e0a69.zip gdb-23e69e47b4cb274e848e0f06e240cdf43b8e0a69.tar.gz gdb-23e69e47b4cb274e848e0f06e240cdf43b8e0a69.tar.bz2 |
include/opcode/
* mips.h: Update documentation of "+s" and "+S".
opcodes/
* mips-opc.c (mips_builtin_opcodes): Use "+s" for "cins32" and
"+S" for "cins".
* mips-dis.c (print_mips_arg): Update "+s" and "+S" comments.
Combine cases.
gas/
* config/tc-mips.c (mips_ip): Preserve the real bit number for "+p".
Require the msb to be <= 31 for "+s". Check that the size is <= 31
for both "+s" and "+S".
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-mips.c | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3450c83..6b60e2d 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,11 @@ 2013-07-07 Richard Sandiford <rdsandiford@googlemail.com> + * config/tc-mips.c (mips_ip): Preserve the real bit number for "+p". + Require the msb to be <= 31 for "+s". Check that the size is <= 31 + for both "+s" and "+S". + +2013-07-07 Richard Sandiford <rdsandiford@googlemail.com> + * config/tc-mips.c (validate_mips_insn, validate_micromips_insn): (mips_ip, mips16_ip): Handle "+i". diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 9d058af..7acb5e2 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -12016,8 +12016,7 @@ mips_ip (char *str, struct mips_cl_insn *ip) (unsigned long) imm_expr.X_add_number); imm_expr.X_add_number = 0; } - /* Make the pos explicit to simplify +S. */ - lastpos = imm_expr.X_add_number + 32; + lastpos = imm_expr.X_add_number; INSERT_OPERAND (0, CINSPOS, *ip, imm_expr.X_add_number); imm_expr.X_op = O_absent; s = expr_end; @@ -12039,11 +12038,12 @@ mips_ip (char *str, struct mips_cl_insn *ip) continue; case 's': - /* cins and exts length-minus-one field. */ + /* cins32 and exts32 length-minus-one field. */ gas_assert (!mips_opts.micromips); my_getExpression (&imm_expr, s); check_absolute_expr (ip, &imm_expr); - if ((unsigned long) imm_expr.X_add_number > 31) + if ((unsigned long) imm_expr.X_add_number > 31 + || (unsigned long) imm_expr.X_add_number + lastpos > 31) { as_bad (_("Improper size (%lu)"), (unsigned long) imm_expr.X_add_number); @@ -12055,12 +12055,11 @@ mips_ip (char *str, struct mips_cl_insn *ip) continue; case 'S': - /* cins32/exts32 and cins/exts aliasing cint32/exts32 - length-minus-one field. */ + /* cins/exts length-minus-one field. */ gas_assert (!mips_opts.micromips); my_getExpression (&imm_expr, s); check_absolute_expr (ip, &imm_expr); - if ((long) imm_expr.X_add_number < 0 + if ((unsigned long) imm_expr.X_add_number > 31 || (unsigned long) imm_expr.X_add_number + lastpos > 63) { as_bad (_("Improper size (%lu)"), |