diff options
author | Victor Do Nascimento <victor.donascimento@arm.com> | 2023-11-09 11:19:47 +0000 |
---|---|---|
committer | Victor Do Nascimento <victor.donascimento@arm.com> | 2023-11-09 13:37:33 +0000 |
commit | f11f256f5638679548cd7e1fb189135575cb7b5f (patch) | |
tree | d57308d764775f2138ade244b17674c68659c48d /gas | |
parent | e7d74879870833fb0c42282da940e60fee13948e (diff) | |
download | binutils-f11f256f5638679548cd7e1fb189135575cb7b5f.zip binutils-f11f256f5638679548cd7e1fb189135575cb7b5f.tar.gz binutils-f11f256f5638679548cd7e1fb189135575cb7b5f.tar.bz2 |
aarch64: Fix error in THE system register checking
The erroneous omission of a "reg_value == " in the THE system register
encoding check added in [1] led to an error which was not picked up in
GCC but which was flagged in Clang due to its use of
[-Werror,-Wconstant-logical-operand] check. Together with this fix we
add a new test for the THE registers to pick up their illegal use,
adding an extra and important layer of validation.
Furthermore, in separating system register from instruction
implementation (with which only the former was of concern in the cited
patch), additions made to `aarch64-tbl.h' are rolled back so
that these can be added later when adding THE instructions to the
codebase, a more natural place for these changes.
[1] https://sourceware.org/pipermail/binutils/2023-November/130314.html
opcodes/ChangeLog:
* aarch64-opc.c (aarch64_sys_ins_reg_supported_p): Fix typo.
* aarch64-tbl.h (THE): Remove.
(aarch64_feature_set aarch64_feature_the): Likewise.
gas/ChangeLog:
* testsuite/gas/aarch64/illegal-sysreg-8.l: Add tests for THE
system registers.
* testsuite/gas/aarch64/illegal-sysreg-8.s: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/testsuite/gas/aarch64/illegal-sysreg-8.l | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/illegal-sysreg-8.s | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gas/testsuite/gas/aarch64/illegal-sysreg-8.l b/gas/testsuite/gas/aarch64/illegal-sysreg-8.l index 6a5f8fe..773e8d8 100644 --- a/gas/testsuite/gas/aarch64/illegal-sysreg-8.l +++ b/gas/testsuite/gas/aarch64/illegal-sysreg-8.l @@ -3,6 +3,14 @@ .*: *Info: macro .* .*: Error: selected processor does not support system register name 'ccsidr2_el1' .*: *Info: macro .* +.*: Error: selected processor does not support system register name 'rcwmask_el1' +.*: *Info: macro .* +.*: Error: selected processor does not support system register name 'rcwmask_el1' +.*: *Info: macro .* +.*: Error: selected processor does not support system register name 'rcwsmask_el1' +.*: *Info: macro .* +.*: Error: selected processor does not support system register name 'rcwsmask_el1' +.*: *Info: macro .* .*: Error: selected processor does not support system register name 'trfcr_el1' .*: *Info: macro .* .*: Error: selected processor does not support system register name 'trfcr_el1' diff --git a/gas/testsuite/gas/aarch64/illegal-sysreg-8.s b/gas/testsuite/gas/aarch64/illegal-sysreg-8.s index a1a7ae6..0ce61dd 100644 --- a/gas/testsuite/gas/aarch64/illegal-sysreg-8.s +++ b/gas/testsuite/gas/aarch64/illegal-sysreg-8.s @@ -16,6 +16,8 @@ .arch armv8.2-a roreg ccsidr2_el1 + rwreg rcwmask_el1 + rwreg rcwsmask_el1 .arch armv8.3-a |