[PATCH 1/2] aarch64: add Branch Record Buffer extension instructions
Claudio Bantaloukas
claudio.bantaloukas@arm.com
Fri Jun 7 13:59:02 GMT 2024
The FEAT_BRBE extension provides two aliases of sys:
- brb iall (Invalidates all Branch records in the Branch Record Buffer)
- brb inj (Injects the Branch Record held in BRBINFINJ_EL1,
BRBSRCINJ_EL1, and BRBTGTINJ_EL1 into the Branch Record Buffer)
This patch adds:
- the feature option "brbe" that must be added for the aliases to be available
- a new operand flag AARCH64_OPND_Rt_IN_SYS_ALIASES that warns in a comment
when Rt is set to the non default value 0b11111 (it is constrained
unpredictable whether the instruction is undefined or behaves as if the Rt
field is set to 0b11111).
- a new operand flag AARCH64_OPND_BRBOP that encodes and decodes Op2 values
from bit 5
- support for the two brb aliases above
See:
- https://developer.arm.com/documentation/ddi0602/2024-03/Base-Instructions/BRB--Branch-Record-Buffer--an-alias-of-SYS-?lang=en
- https://developer.arm.com/documentation/ddi0601/2024-03/AArch64-Instructions/BRB-INJ--Branch-Record-Injection-into-the-Branch-Record-Buffer?lang=en
- https://developer.arm.com/documentation/ddi0601/2024-03/AArch64-Instructions/BRB-IALL--Invalidate-the-Branch-Record-Buffer?lang=en
---
gas/config/tc-aarch64.c | 8 +++++++
gas/doc/c-aarch64.texi | 2 ++
gas/testsuite/gas/aarch64/brbe-brb-bad.d | 2 ++
gas/testsuite/gas/aarch64/brbe-brb-bad.l | 4 ++++
gas/testsuite/gas/aarch64/brbe-brb-bad.s | 6 +++++
gas/testsuite/gas/aarch64/brbe-brb-inst.d | 14 ++++++++++++
gas/testsuite/gas/aarch64/brbe-brb-inst.s | 5 ++++
gas/testsuite/gas/aarch64/brbe-brb-invalid.d | 3 +++
gas/testsuite/gas/aarch64/brbe-brb-invalid.l | 3 +++
gas/testsuite/gas/aarch64/brbe-brb.d | 12 ++++++++++
gas/testsuite/gas/aarch64/brbe-brb.s | 5 ++++
include/opcode/aarch64.h | 7 +++++-
opcodes/aarch64-opc.c | 24 ++++++++++++++++++++
opcodes/aarch64-opc.h | 1 +
opcodes/aarch64-tbl.h | 15 ++++++++++++
15 files changed, 110 insertions(+), 1 deletion(-)
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb-bad.d
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb-bad.l
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb-bad.s
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb-inst.d
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb-inst.s
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb-invalid.d
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb-invalid.l
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb.d
create mode 100644 gas/testsuite/gas/aarch64/brbe-brb.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-aarch64-add-Branch-Record-Buffer-extension-instructi.patch
Type: text/x-patch
Size: 12845 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20240607/a550a285/attachment-0001.bin>
More information about the Binutils
mailing list