summaryrefslogtreecommitdiff
path: root/gas/config/tc-aarch64.c
diff options
context:
space:
mode:
authorYufeng Zhang <yufeng.zhang@arm.com>2013-02-28 18:51:02 +0000
committerYufeng Zhang <yufeng.zhang@arm.com>2013-02-28 18:51:02 +0000
commite6a5175e5326af625d5bc69fbf4db1b7bb454719 (patch)
tree27cf2fb608a07c71ad74f06304a6f04f08739ac9 /gas/config/tc-aarch64.c
parente161f717e0220a82002543b04d80404dac977418 (diff)
downloadbinutils-redhat-e6a5175e5326af625d5bc69fbf4db1b7bb454719.tar.gz
gas/
* config/tc-aarch64.c (parse_sys_reg): Allow the full range of CRn for system registers. gas/testsuite/ * gas/aarch64/illegal.l: Delete the error message for msr S3_1_C13_C15_1,x7. * gas/aarch64/sysreg.s: Add new tests. * gas/aarch64/sysreg.d: Update.
Diffstat (limited to 'gas/config/tc-aarch64.c')
-rw-r--r--gas/config/tc-aarch64.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index ce59705189..47c27fee45 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -3197,10 +3197,14 @@ parse_sys_reg (char **str, struct hash_control *sys_regs, int imple_defined_p)
unsigned int op0, op1, cn, cm, op2;
if (sscanf (buf, "s%u_%u_c%u_c%u_%u", &op0, &op1, &cn, &cm, &op2) != 5)
return PARSE_FAIL;
- /* Register access is encoded as follows:
+ /* The architecture specifies the encoding space for implementation
+ defined registers as:
op0 op1 CRn CRm op2
- 11 xxx 1x11 xxxx xxx. */
- if (op0 != 3 || op1 > 7 || (cn | 0x4) != 0xf || cm > 15 || op2 > 7)
+ 11 xxx 1x11 xxxx xxx
+ For convenience GAS accepts a wider encoding space, as follows:
+ op0 op1 CRn CRm op2
+ 11 xxx xxxx xxxx xxx */
+ if (op0 != 3 || op1 > 7 || cn > 15 || cm > 15 || op2 > 7)
return PARSE_FAIL;
value = (op0 << 14) | (op1 << 11) | (cn << 7) | (cm << 3) | op2;
}