diff options
author | Richard Sandiford <rsandifo@nildram.co.uk> | 2013-07-07 10:00:42 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@nildram.co.uk> | 2013-07-07 10:00:42 +0000 |
commit | fc309cea152f42d511039ef70d367d8ebc7a43fb (patch) | |
tree | d6f6bb991ad689182aba8ff79a05ebf116cde0d4 /gas/config | |
parent | 82477f12b5829e2e8584d531312ef0883518707d (diff) | |
download | binutils-redhat-fc309cea152f42d511039ef70d367d8ebc7a43fb.tar.gz |
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/config')
-rw-r--r-- | gas/config/tc-mips.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 9d058afb89..7acb5e25fc 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)"), |