diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2013-07-08 08:39:32 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2013-07-08 08:39:32 +0000 |
commit | 0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c (patch) | |
tree | 11299aec64e03d53ab597ce559e0e2e010913f48 /gas/config/tc-mips.c | |
parent | 93161bef4c9e9bb7dd92eff1b1b3fa9ebf50c5ac (diff) | |
download | gdb-0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c.zip gdb-0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c.tar.gz gdb-0cbbe1b85eef405c0ddb22389f85a65d8a8bf28c.tar.bz2 |
gas/
* config/tc-mips.c (mips_ip): Unconditionally parse an expression
for 'A' and assume that the constant has been elided if the result
is an O_register.
gas/testsuite/
* gas/mips/la.s, gas/mips/la.d, gas/mips/la-svr4pic.d,
gas/mips/la-xgot.d: Add tests for bracketed addresses.
Diffstat (limited to 'gas/config/tc-mips.c')
-rw-r--r-- | gas/config/tc-mips.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c index 5c6424e..22ba44a 100644 --- a/gas/config/tc-mips.c +++ b/gas/config/tc-mips.c @@ -12702,17 +12702,17 @@ mips_ip (char *str, struct mips_cl_insn *ip) continue; case 'A': - /* If we expect a base register, check whether there is only - a single bracketed expression left. If so, it must be the - base register and the constant must be zero. */ - if (args[1] == '(' && *s == '(' && strchr (s + 1, '(') == 0) + my_getSmallExpression (&offset_expr, offset_reloc, s); + if (offset_expr.X_op == O_register) { + /* Assume that the offset has been elided and that what + we saw was a base register. The match will fail later + if that assumption turns out to be wrong. */ offset_expr.X_op = O_constant; offset_expr.X_add_number = 0; } else { - my_getSmallExpression (&offset_expr, offset_reloc, s); normalize_address_expr (&offset_expr); s = expr_end; } |