From: Andrea Corallo <andrea.corallo@arm.com>
To: <binutils@sourceware.org>
Cc: <Richard.Earnshaw@arm.com>, <nickc@redhat.com>,
Andrea Corallo <andrea.corallo@arm.com>
Subject: [PATCH 2/3] aarch64: Add FEAT_ECBHB support
Date: Mon, 6 Nov 2023 15:04:54 +0100 [thread overview]
Message-ID: <20231106140455.1694695-2-andrea.corallo@arm.com> (raw)
In-Reply-To: <20231106140455.1694695-1-andrea.corallo@arm.com>
This patch add support for FEAT_ECBHB "Exploitative control using
branch history information" adding the "clrbhb" instruction. AFAIU
the same alias was originally added as "clearbhb" before the
architecture was finalized (Mandatory v8.9-a/v9.4-a; Optional
v8.0-a+/v9.0-a+).
---
gas/testsuite/gas/aarch64/clrbhb-1.d | 9 +++++++++
gas/testsuite/gas/aarch64/clrbhb-1.s | 2 ++
gas/testsuite/gas/aarch64/system.d | 4 ++--
opcodes/aarch64-tbl.h | 4 ++++
4 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 gas/testsuite/gas/aarch64/clrbhb-1.d
create mode 100644 gas/testsuite/gas/aarch64/clrbhb-1.s
diff --git a/gas/testsuite/gas/aarch64/clrbhb-1.d b/gas/testsuite/gas/aarch64/clrbhb-1.d
new file mode 100644
index 00000000000..272ee23dfda
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/clrbhb-1.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0+ <.*>:
+ 0: d50322df clrbhb
+
diff --git a/gas/testsuite/gas/aarch64/clrbhb-1.s b/gas/testsuite/gas/aarch64/clrbhb-1.s
new file mode 100644
index 00000000000..edf88466e4c
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/clrbhb-1.s
@@ -0,0 +1,2 @@
+ clrbhb
+
diff --git a/gas/testsuite/gas/aarch64/system.d b/gas/testsuite/gas/aarch64/system.d
index bb1a94cb020..a1114169d55 100644
--- a/gas/testsuite/gas/aarch64/system.d
+++ b/gas/testsuite/gas/aarch64/system.d
@@ -14,7 +14,7 @@ Disassembly of section \.text:
.*: d503207f wfi
.*: d503209f sev
.*: d50320bf sevl
-.*: d50322df clearbhb
+.*: d50322df clrbhb
.*: d503201f nop
.*: d503203f yield
.*: d503205f wfe
@@ -37,7 +37,7 @@ Disassembly of section \.text:
.*: d503227f (hint #0x13|gcsb dsync)
.*: d503229f (hint #0x14|csdb)
.*: d50322bf hint #0x15
-.*: d50322df (hint #0x16|clearbhb)
+.*: d50322df (hint #0x16|clrbhb)
.*: d50322ff hint #0x17
.*: d503231f (hint #0x18|paciaz)
.*: d503233f (hint #0x19|paciasp)
diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h
index e07836cd668..b64d94ab70f 100644
--- a/opcodes/aarch64-tbl.h
+++ b/opcodes/aarch64-tbl.h
@@ -6101,6 +6101,10 @@ const struct aarch64_opcode aarch64_opcode_table[] =
CSSC_INSN ("smin", 0x1ac06800, 0x7fe0fc00, OP3 (Rd, Rn, Rm), QL_I3SAMER, F_SF),
CSSC_INSN ("umin", 0x1ac06c00, 0x7fe0fc00, OP3 (Rd, Rn, Rm), QL_I3SAMER, F_SF),
+ /* FEAT_CLRBHB part of the hint space and available without special
+ command-line flags. */
+ CORE_INSN ("clrbhb", 0xd50322df, 0xffffffff, ic_system, 0, OP0 (), {}, F_ALIAS),
+
{0, 0, 0, 0, 0, 0, {}, {}, 0, 0, 0, NULL},
};
--
2.25.1
next prev parent reply other threads:[~2023-11-06 14:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 14:04 [PATCH 1/3] aarch64: Add FEAT_SPECRES2 support Andrea Corallo
2023-11-06 14:04 ` Andrea Corallo [this message]
2023-11-07 10:58 ` [PATCH 2/3] aarch64: Add FEAT_ECBHB support Nick Clifton
2023-11-06 14:04 ` [PATCH 3/3] aarch64: Add FEAT_ITE support Andrea Corallo
2023-11-07 10:59 ` Nick Clifton
2023-12-19 14:41 ` Andrea Corallo
2023-11-07 10:57 ` [PATCH 1/3] aarch64: Add FEAT_SPECRES2 support Nick Clifton
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=20231106140455.1694695-2-andrea.corallo@arm.com \
--to=andrea.corallo@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.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).