From 88b5a8ae138f3ace20f63635dbaea437fb17ae78 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Wed, 6 Sep 2023 15:52:45 +0100 Subject: aarch64: Add FEAT_SPECRES2 support This patch add supports for FEAT_SPECRES2 "Enhanced speculation restriction instructions" adding the "cosp" instruction. This is mandatory v8.9-a/v9.4-a and optional v8.0-a+/v9.0-a+. It is enabled by the +predres2 march flag. --- include/opcode/aarch64.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/opcode') diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h index 6323383..7b3ddf3 100644 --- a/include/opcode/aarch64.h +++ b/include/opcode/aarch64.h @@ -197,6 +197,8 @@ enum aarch64_feature_bit { AARCH64_FEATURE_S2POE, /* Extension to Translation Control Registers. */ AARCH64_FEATURE_TCR2, + /* Speculation Prediction Restriction instructions. */ + AARCH64_FEATURE_PREDRES2, AARCH64_NUM_FEATURES }; @@ -276,7 +278,8 @@ enum aarch64_feature_bit { #define AARCH64_ARCH_V9_1A_FEATURES(X) AARCH64_ARCH_V8_6A_FEATURES (X) #define AARCH64_ARCH_V9_2A_FEATURES(X) AARCH64_ARCH_V8_7A_FEATURES (X) #define AARCH64_ARCH_V9_3A_FEATURES(X) AARCH64_ARCH_V8_8A_FEATURES (X) -#define AARCH64_ARCH_V9_4A_FEATURES(X) AARCH64_ARCH_V8_9A_FEATURES (X) +#define AARCH64_ARCH_V9_4A_FEATURES(X) (AARCH64_ARCH_V8_9A_FEATURES (X) \ + | AARCH64_FEATBIT (X, PREDRES2)) /* Architectures are the sum of the base and extensions. */ #define AARCH64_ARCH_V8A(X) (AARCH64_FEATBIT (X, V8) \ -- cgit v1.1