[PATCH 3/4] aarch64: Add support for Armv8-R system registers
Alex Coplan
alex.coplan@arm.com
Mon Sep 7 15:54:56 GMT 2020
This patch adds support for the system registers introduced in Armv8-R
AArch64.
Testing:
* Exhaustive assembly/disassembly tests for new system registers.
* Tests to check that invalid use is correctly diagnosed.
* Regression tested an x64 -> aarch64-none-elf cross, no regressions.
---
gas/ChangeLog:
2020-09-04 Alex Coplan <alex.coplan@arm.com>
* config/tc-aarch64.c (parse_sys_reg): Also pass sysreg name to
validation function.
(parse_sys_ins_reg): Likewise.
(print_operands): Pass CPU features to aarch64_print_operand().
* testsuite/gas/aarch64/v8-r-bad-sysregs.d: New test.
* testsuite/gas/aarch64/v8-r-bad-sysregs.l: Error output.
* testsuite/gas/aarch64/v8-r-bad-sysregs.s: Input.
* testsuite/gas/aarch64/v8-r-sysregs-need-arch.d: New test.
* testsuite/gas/aarch64/v8-r-sysregs-need-arch.l: Error output.
* testsuite/gas/aarch64/v8-r-sysregs.d: New test.
* testsuite/gas/aarch64/v8-r-sysregs.s: Input for previous two tests.
include/ChangeLog:
2020-09-04 Alex Coplan <alex.coplan@arm.com>
* opcode/aarch64.h (aarch64_sys_ins_reg_supported_p): Also take
system register name in order to simplify validation for v8-R.
(aarch64_print_operand): Also take CPU feature set, as disassembly for
system registers now depends on arch variant.
opcodes/ChangeLog:
2020-09-04 Alex Coplan <alex.coplan@arm.com>
* aarch64-dis.c (print_operands): Pass CPU features to
aarch64_print_operand().
* aarch64-opc.c (aarch64_print_operand): Use CPU features to determine
preferred disassembly of system registers.
(SR_RNG): Refactor to use new SR_FEAT2 macro.
(SR_FEAT2): New.
(SR_V8_1_A): New.
(SR_V8_4_A): New.
(SR_V8_A): New.
(SR_V8_R): New.
(SR_EXPAND_ELx): New.
(SR_EXPAND_EL12): New.
(aarch64_sys_regs): Specify which registers are only on
A-profile, add R-profile system registers.
(ENC_BARLAR): New.
(PRBARn_ELx): New.
(PRLARn_ELx): New.
(aarch64_sys_ins_reg_supported_p): Reject EL3 registers for
Armv8-R AArch64.
---
gas/config/tc-aarch64.c | 9 +-
gas/testsuite/gas/aarch64/v8-r-bad-sysregs.d | 3 +
gas/testsuite/gas/aarch64/v8-r-bad-sysregs.l | 14 ++
gas/testsuite/gas/aarch64/v8-r-bad-sysregs.s | 23 +++
.../gas/aarch64/v8-r-sysregs-need-arch.d | 3 +
.../gas/aarch64/v8-r-sysregs-need-arch.l | 141 +++++++++++++++++
gas/testsuite/gas/aarch64/v8-r-sysregs.d | 149 ++++++++++++++++++
gas/testsuite/gas/aarch64/v8-r-sysregs.s | 141 +++++++++++++++++
include/opcode/aarch64.h | 6 +-
opcodes/aarch64-dis.c | 2 +-
opcodes/aarch64-opc.c | 79 ++++++++--
11 files changed, 554 insertions(+), 16 deletions(-)
create mode 100644 gas/testsuite/gas/aarch64/v8-r-bad-sysregs.d
create mode 100644 gas/testsuite/gas/aarch64/v8-r-bad-sysregs.l
create mode 100644 gas/testsuite/gas/aarch64/v8-r-bad-sysregs.s
create mode 100644 gas/testsuite/gas/aarch64/v8-r-sysregs-need-arch.d
create mode 100644 gas/testsuite/gas/aarch64/v8-r-sysregs-need-arch.l
create mode 100644 gas/testsuite/gas/aarch64/v8-r-sysregs.d
create mode 100644 gas/testsuite/gas/aarch64/v8-r-sysregs.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-aarch64-Add-support-for-Armv8-R-system-registers.patch
Type: text/x-patch
Size: 31391 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200907/917e43a0/attachment-0001.bin>
More information about the Binutils
mailing list