From: Matthieu Longo <matthieu.longo@arm.com>
To: <binutils@sourceware.org>
Cc: Richard Earnshaw <richard.earnshaw@arm.com>,
Nick Clifton <nickc@redhat.com>,
Matthieu Longo <matthieu.longo@arm.com>
Subject: [PATCH v1 3/4] aarch64: add STEP2 feature and its associated registers
Date: Thu, 4 Jul 2024 15:23:37 +0100 [thread overview]
Message-ID: <20240704142338.1582659-4-matthieu.longo@arm.com> (raw)
In-Reply-To: <20240704142338.1582659-1-matthieu.longo@arm.com>
[-- Attachment #1: Type: text/plain, Size: 615 bytes --]
AArch64 defines new registers for the feature step2 (Enhanced Software Step
Extension). step2 is an Armv9.5-A feature.
This patch also adds relevant tests. Regression tested on aarch64-none-elf,
and no regression found.
---
.../aarch64/sysreg/armv9_5-a-sysregs-archv9_4-unsupported.l | 4 ++++
gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.d | 2 ++
gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.s | 3 +++
include/opcode/aarch64.h | 3 +++
opcodes/aarch64-sys-regs.def | 1 +
5 files changed, 13 insertions(+)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: v1-0003-aarch64-add-STEP2-feature-and-its-associated-regi.patch --]
[-- Type: text/x-patch; name="v1-0003-aarch64-add-STEP2-feature-and-its-associated-regi.patch", Size: 3481 bytes --]
diff --git a/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs-archv9_4-unsupported.l b/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs-archv9_4-unsupported.l
index 66dd5e8558e..58e7f9b9c26 100644
--- a/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs-archv9_4-unsupported.l
+++ b/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs-archv9_4-unsupported.l
@@ -10,4 +10,8 @@
[^ :]+:[0-9]+: Error: selected processor does not support system register name 'spmzr_el0'
[^ :]+:[0-9]+: Info: macro invoked from here
[^ :]+:[0-9]+: Error: selected processor does not support system register name 'spmzr_el0'
+[^ :]+:[0-9]+: Info: macro invoked from here
+[^ :]+:[0-9]+: Error: selected processor does not support system register name 'mdstepop_el1'
+[^ :]+:[0-9]+: Info: macro invoked from here
+[^ :]+:[0-9]+: Error: selected processor does not support system register name 'mdstepop_el1'
[^ :]+:[0-9]+: Info: macro invoked from here
\ No newline at end of file
diff --git a/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.d b/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.d
index 1a6c3be8abb..c52142d3998 100644
--- a/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.d
+++ b/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.d
@@ -13,3 +13,5 @@ Disassembly of section \.text:
.*: d53e5260 mrs x0, vsesr_el3
.*: d5139c80 msr spmzr_el0, x0
.*: d5339c80 mrs x0, spmzr_el0
+.*: d5100540 msr mdstepop_el1, x0
+.*: d5300540 mrs x0, mdstepop_el1
diff --git a/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.s b/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.s
index 701a80ce903..e3ba989c88e 100644
--- a/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.s
+++ b/gas/testsuite/gas/aarch64/sysreg/armv9_5-a-sysregs.s
@@ -8,3 +8,6 @@ rw_sys_reg sys_reg=vsesr_el3 xreg=x0 r=1 w=1
/* System Performance Monitors Extension version 2. */
rw_sys_reg sys_reg=spmzr_el0 xreg=x0 r=1 w=1
+
+/* Enhanced Software Step Extension. */
+rw_sys_reg sys_reg=mdstepop_el1 xreg=x0 r=1 w=1
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 4dc30193d40..dfed0a509b2 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -234,6 +234,8 @@ enum aarch64_feature_bit {
AARCH64_FEATURE_SVE2p1,
/* RCPC3 instructions. */
AARCH64_FEATURE_RCPC3,
+ /* Enhanced Software Step Extension. */
+ AARCH64_FEATURE_STEP2,
/* Checked Pointer Arithmetic instructions. */
AARCH64_FEATURE_CPA,
/* FAMINMAX instructions. */
@@ -373,6 +375,7 @@ enum aarch64_feature_bit {
| AARCH64_FEATBIT (X, FAMINMAX)\
| AARCH64_FEATBIT (X, E3DSE) \
| AARCH64_FEATBIT (X, SPMU2) \
+ | AARCH64_FEATBIT (X, STEP2) \
)
/* Architectures are the sum of the base and extensions. */
diff --git a/opcodes/aarch64-sys-regs.def b/opcodes/aarch64-sys-regs.def
index 4fbc65e32fd..cd2f1ac8516 100644
--- a/opcodes/aarch64-sys-regs.def
+++ b/opcodes/aarch64-sys-regs.def
@@ -573,6 +573,7 @@
SYSREG ("mdrar_el1", CPENC (2,0,1,0,0), F_REG_READ, AARCH64_NO_FEATURES)
SYSREG ("mdscr_el1", CPENC (2,0,0,2,2), 0, AARCH64_NO_FEATURES)
SYSREG ("mdselr_el1", CPENC (2,0,0,4,2), F_ARCHEXT, AARCH64_FEATURE (DEBUGv8p9))
+ SYSREG ("mdstepop_el1", CPENC (2,0,0,5,2), F_ARCHEXT, AARCH64_FEATURE (STEP2))
SYSREG ("mecid_a0_el2", CPENC (3,4,10,8,1), 0, AARCH64_NO_FEATURES)
SYSREG ("mecid_a1_el2", CPENC (3,4,10,8,3), 0, AARCH64_NO_FEATURES)
SYSREG ("mecid_p0_el2", CPENC (3,4,10,8,0), 0, AARCH64_NO_FEATURES)
next prev parent reply other threads:[~2024-07-04 14:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 14:23 [PATCH v1 0/4] aarch64: add new Armv9.5-A features and their associated registers (RAS, Debug, Performance Monitor) Matthieu Longo
2024-07-04 14:23 ` [PATCH v1 1/4] aarch64: add E3DSE feature and its associated registers Matthieu Longo
2024-07-04 14:23 ` [PATCH v1 2/4] aarch64: add SPMU2 " Matthieu Longo
2024-07-04 14:23 ` Matthieu Longo [this message]
2024-07-04 14:23 ` [PATCH v1 4/4] aarch64: add Debug Feature Register 2 (ID_AA64DFR2_EL1) Matthieu Longo
2024-07-05 12:20 ` [PATCH v1 0/4] aarch64: add new Armv9.5-A features and their associated registers (RAS, Debug, Performance Monitor) Richard Earnshaw (lists)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240704142338.1582659-4-matthieu.longo@arm.com \
--to=matthieu.longo@arm.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
--cc=richard.earnshaw@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).