aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTerry Guo <terry.guo@arm.com>2015-03-24 14:08:08 +0800
committerTerry Guo <terry.guo@arm.com>2015-03-24 14:08:08 +0800
commit823d25713dd1d6aedc605e3da2007b54da9dff2d (patch)
tree95137bfd2dd329e0fe7a20aed26ed979dd57c363 /include
parent596f88276cffbca82e3858da40db7e7cc7aa476e (diff)
downloadgdb-823d25713dd1d6aedc605e3da2007b54da9dff2d.zip
gdb-823d25713dd1d6aedc605e3da2007b54da9dff2d.tar.gz
gdb-823d25713dd1d6aedc605e3da2007b54da9dff2d.tar.bz2
Extend arm_feature_set struct to provide more bits
gas/ChangeLog: 2015-03-24 Terry Guo <terry.guo@arm.com> * config/tc-arm.c (no_cpu_selected): Use new macro to compare features. (parse_psr): Likewise. (do_t_mrs): Likewise. (do_t_msr): Likewise. (static const arm_feature_set arm_ext_*): Defined with new macros. (static const arm_feature_set arm_cext_*): Likewise. (static const arm_feature_set fpu_fpa_ext_*): Likewise. (static const arm_feature_set fpu_vfp_ext_*): Likewise. (deprecated_coproc_regs): Likewise. (UL_BARRIER): Likewise. (barrier_opt_names): Likewise. (arm_cpus): Likewise. (arm_extensions): Likewise. include/opcode/ChangeLog: 2015-03-24 Terry Guo <terry.guo@arm.com> * arm.h (arm_feature_set): Extended to provide more available * bits. (ARM_ANY): Updated to follow above new definition. (ARM_CPU_HAS_FEATURE): Likewise. (ARM_CPU_IS_ANY): Likewise. (ARM_MERGE_FEATURE_SETS): Likewise. (ARM_CLEAR_FEATURE): Likewise. (ARM_FEATURE): Likewise. (ARM_FEATURE_COPY): New macro. (ARM_FEATURE_EQUAL): Likewise. (ARM_FEATURE_ZERO): Likewise. (ARM_FEATURE_CORE_EQUAL): Likewise. (ARM_FEATURE_LOW): Likewise. (ARM_FEATURE_CORE_LOW): Likewise. (ARM_FEATURE_CORE_COPROC): Likewise. opcodes/ChangeLog: 2015-03-24 Terry Guo <terry.guo@arm.com> * arm-dis.c (opcode32): Updated to use new arm feature struct. (opcode16): Likewise. (coprocessor_opcodes): Replace bit with feature struct. (neon_opcodes): Likewise. (arm_opcodes): Likewise. (thumb_opcodes): Likewise. (thumb32_opcodes): Likewise. (print_insn_coprocessor): Likewise. (print_insn_arm): Likewise. (select_arm_features): Follow new feature struct.
Diffstat (limited to 'include')
-rw-r--r--include/opcode/ChangeLog17
-rw-r--r--include/opcode/arm.h202
2 files changed, 134 insertions, 85 deletions
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 36bc335..4a0534f 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,20 @@
+2015-03-24 Terry Guo <terry.guo@arm.com>
+
+ * arm.h (arm_feature_set): Extended to provide more available bits.
+ (ARM_ANY): Updated to follow above new definition.
+ (ARM_CPU_HAS_FEATURE): Likewise.
+ (ARM_CPU_IS_ANY): Likewise.
+ (ARM_MERGE_FEATURE_SETS): Likewise.
+ (ARM_CLEAR_FEATURE): Likewise.
+ (ARM_FEATURE): Likewise.
+ (ARM_FEATURE_COPY): New macro.
+ (ARM_FEATURE_EQUAL): Likewise.
+ (ARM_FEATURE_ZERO): Likewise.
+ (ARM_FEATURE_CORE_EQUAL): Likewise.
+ (ARM_FEATURE_LOW): Likewise.
+ (ARM_FEATURE_CORE_LOW): Likewise.
+ (ARM_FEATURE_CORE_COPROC): Likewise.
+
2015-02-19 Pedro Alves <palves@redhat.com>
* cgen.h [__cplusplus]: Wrap in extern "C".
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index cd1953c..1bf6b3c 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -139,11 +139,12 @@
| ARM_EXT_VIRT | ARM_EXT_V8)
/* Processors with specific extensions in the co-processor space. */
-#define ARM_ARCH_XSCALE ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE)
+#define ARM_ARCH_XSCALE ARM_FEATURE_LOW (ARM_AEXT_V5TE, ARM_CEXT_XSCALE)
#define ARM_ARCH_IWMMXT \
- ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT)
+ ARM_FEATURE_LOW (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT)
#define ARM_ARCH_IWMMXT2 \
- ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT | ARM_CEXT_IWMMXT2)
+ ARM_FEATURE_LOW (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT \
+ | ARM_CEXT_IWMMXT2)
#define FPU_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_ENDIAN_PURE)
#define FPU_VFP_V1 (FPU_VFP_V1xD | FPU_VFP_EXT_V1)
@@ -165,128 +166,159 @@
#define FPU_FPA (FPU_FPA_EXT_V1 | FPU_FPA_EXT_V2)
/* Deprecated. */
-#define FPU_ARCH_VFP ARM_FEATURE (0, FPU_ENDIAN_PURE)
+#define FPU_ARCH_VFP ARM_FEATURE_COPROC (FPU_ENDIAN_PURE)
-#define FPU_ARCH_FPE ARM_FEATURE (0, FPU_FPA_EXT_V1)
-#define FPU_ARCH_FPA ARM_FEATURE (0, FPU_FPA)
+#define FPU_ARCH_FPE ARM_FEATURE_COPROC (FPU_FPA_EXT_V1)
+#define FPU_ARCH_FPA ARM_FEATURE_COPROC (FPU_FPA)
-#define FPU_ARCH_VFP_V1xD ARM_FEATURE (0, FPU_VFP_V1xD)
-#define FPU_ARCH_VFP_V1 ARM_FEATURE (0, FPU_VFP_V1)
-#define FPU_ARCH_VFP_V2 ARM_FEATURE (0, FPU_VFP_V2)
-#define FPU_ARCH_VFP_V3D16 ARM_FEATURE (0, FPU_VFP_V3D16)
+#define FPU_ARCH_VFP_V1xD ARM_FEATURE_COPROC (FPU_VFP_V1xD)
+#define FPU_ARCH_VFP_V1 ARM_FEATURE_COPROC (FPU_VFP_V1)
+#define FPU_ARCH_VFP_V2 ARM_FEATURE_COPROC (FPU_VFP_V2)
+#define FPU_ARCH_VFP_V3D16 ARM_FEATURE_COPROC (FPU_VFP_V3D16)
#define FPU_ARCH_VFP_V3D16_FP16 \
- ARM_FEATURE (0, FPU_VFP_V3D16 | FPU_VFP_EXT_FP16)
-#define FPU_ARCH_VFP_V3 ARM_FEATURE (0, FPU_VFP_V3)
-#define FPU_ARCH_VFP_V3_FP16 ARM_FEATURE (0, FPU_VFP_V3 | FPU_VFP_EXT_FP16)
-#define FPU_ARCH_VFP_V3xD ARM_FEATURE (0, FPU_VFP_V3xD)
-#define FPU_ARCH_VFP_V3xD_FP16 ARM_FEATURE (0, FPU_VFP_V3xD | FPU_VFP_EXT_FP16)
-#define FPU_ARCH_NEON_V1 ARM_FEATURE (0, FPU_NEON_EXT_V1)
+ ARM_FEATURE_COPROC (FPU_VFP_V3D16 | FPU_VFP_EXT_FP16)
+#define FPU_ARCH_VFP_V3 ARM_FEATURE_COPROC (FPU_VFP_V3)
+#define FPU_ARCH_VFP_V3_FP16 ARM_FEATURE_COPROC (FPU_VFP_V3 | FPU_VFP_EXT_FP16)
+#define FPU_ARCH_VFP_V3xD ARM_FEATURE_COPROC (FPU_VFP_V3xD)
+#define FPU_ARCH_VFP_V3xD_FP16 ARM_FEATURE_COPROC (FPU_VFP_V3xD \
+ | FPU_VFP_EXT_FP16)
+#define FPU_ARCH_NEON_V1 ARM_FEATURE_COPROC (FPU_NEON_EXT_V1)
#define FPU_ARCH_VFP_V3_PLUS_NEON_V1 \
- ARM_FEATURE (0, FPU_VFP_V3 | FPU_NEON_EXT_V1)
+ ARM_FEATURE_COPROC (FPU_VFP_V3 | FPU_NEON_EXT_V1)
#define FPU_ARCH_NEON_FP16 \
- ARM_FEATURE (0, FPU_VFP_V3 | FPU_NEON_EXT_V1 | FPU_VFP_EXT_FP16)
-#define FPU_ARCH_VFP_HARD ARM_FEATURE (0, FPU_VFP_HARD)
-#define FPU_ARCH_VFP_V4 ARM_FEATURE(0, FPU_VFP_V4)
-#define FPU_ARCH_VFP_V4D16 ARM_FEATURE(0, FPU_VFP_V4D16)
-#define FPU_ARCH_VFP_V4_SP_D16 ARM_FEATURE(0, FPU_VFP_V4_SP_D16)
-#define FPU_ARCH_VFP_V5D16 ARM_FEATURE(0, FPU_VFP_V5D16)
-#define FPU_ARCH_VFP_V5_SP_D16 ARM_FEATURE(0, FPU_VFP_V5_SP_D16)
+ ARM_FEATURE_COPROC (FPU_VFP_V3 | FPU_NEON_EXT_V1 | FPU_VFP_EXT_FP16)
+#define FPU_ARCH_VFP_HARD ARM_FEATURE_COPROC (FPU_VFP_HARD)
+#define FPU_ARCH_VFP_V4 ARM_FEATURE_COPROC (FPU_VFP_V4)
+#define FPU_ARCH_VFP_V4D16 ARM_FEATURE_COPROC (FPU_VFP_V4D16)
+#define FPU_ARCH_VFP_V4_SP_D16 ARM_FEATURE_COPROC (FPU_VFP_V4_SP_D16)
+#define FPU_ARCH_VFP_V5D16 ARM_FEATURE_COPROC (FPU_VFP_V5D16)
+#define FPU_ARCH_VFP_V5_SP_D16 ARM_FEATURE_COPROC (FPU_VFP_V5_SP_D16)
#define FPU_ARCH_NEON_VFP_V4 \
- ARM_FEATURE(0, FPU_VFP_V4 | FPU_NEON_EXT_V1 | FPU_NEON_EXT_FMA)
-#define FPU_ARCH_VFP_ARMV8 ARM_FEATURE(0, FPU_VFP_ARMV8)
-#define FPU_ARCH_NEON_VFP_ARMV8 ARM_FEATURE(0, FPU_NEON_ARMV8 | FPU_VFP_ARMV8)
+ ARM_FEATURE_COPROC (FPU_VFP_V4 | FPU_NEON_EXT_V1 | FPU_NEON_EXT_FMA)
+#define FPU_ARCH_VFP_ARMV8 ARM_FEATURE_COPROC (FPU_VFP_ARMV8)
+#define FPU_ARCH_NEON_VFP_ARMV8 ARM_FEATURE_COPROC (FPU_NEON_ARMV8 \
+ | FPU_VFP_ARMV8)
#define FPU_ARCH_CRYPTO_NEON_VFP_ARMV8 \
- ARM_FEATURE(0, FPU_CRYPTO_ARMV8 | FPU_NEON_ARMV8 | FPU_VFP_ARMV8)
-#define ARCH_CRC_ARMV8 ARM_FEATURE(0, CRC_EXT_ARMV8)
+ ARM_FEATURE_COPROC (FPU_CRYPTO_ARMV8 | FPU_NEON_ARMV8 | FPU_VFP_ARMV8)
+#define ARCH_CRC_ARMV8 ARM_FEATURE_COPROC (CRC_EXT_ARMV8)
-#define FPU_ARCH_ENDIAN_PURE ARM_FEATURE (0, FPU_ENDIAN_PURE)
+#define FPU_ARCH_ENDIAN_PURE ARM_FEATURE_COPROC (FPU_ENDIAN_PURE)
-#define FPU_ARCH_MAVERICK ARM_FEATURE (0, FPU_MAVERICK)
+#define FPU_ARCH_MAVERICK ARM_FEATURE_COPROC (FPU_MAVERICK)
-#define ARM_ARCH_V1 ARM_FEATURE (ARM_AEXT_V1, 0)
-#define ARM_ARCH_V2 ARM_FEATURE (ARM_AEXT_V2, 0)
-#define ARM_ARCH_V2S ARM_FEATURE (ARM_AEXT_V2S, 0)
-#define ARM_ARCH_V3 ARM_FEATURE (ARM_AEXT_V3, 0)
-#define ARM_ARCH_V3M ARM_FEATURE (ARM_AEXT_V3M, 0)
-#define ARM_ARCH_V4xM ARM_FEATURE (ARM_AEXT_V4xM, 0)
-#define ARM_ARCH_V4 ARM_FEATURE (ARM_AEXT_V4, 0)
-#define ARM_ARCH_V4TxM ARM_FEATURE (ARM_AEXT_V4TxM, 0)
-#define ARM_ARCH_V4T ARM_FEATURE (ARM_AEXT_V4T, 0)
-#define ARM_ARCH_V5xM ARM_FEATURE (ARM_AEXT_V5xM, 0)
-#define ARM_ARCH_V5 ARM_FEATURE (ARM_AEXT_V5, 0)
-#define ARM_ARCH_V5TxM ARM_FEATURE (ARM_AEXT_V5TxM, 0)
-#define ARM_ARCH_V5T ARM_FEATURE (ARM_AEXT_V5T, 0)
-#define ARM_ARCH_V5TExP ARM_FEATURE (ARM_AEXT_V5TExP, 0)
-#define ARM_ARCH_V5TE ARM_FEATURE (ARM_AEXT_V5TE, 0)
-#define ARM_ARCH_V5TEJ ARM_FEATURE (ARM_AEXT_V5TEJ, 0)
-#define ARM_ARCH_V6 ARM_FEATURE (ARM_AEXT_V6, 0)
-#define ARM_ARCH_V6K ARM_FEATURE (ARM_AEXT_V6K, 0)
-#define ARM_ARCH_V6Z ARM_FEATURE (ARM_AEXT_V6Z, 0)
-#define ARM_ARCH_V6ZK ARM_FEATURE (ARM_AEXT_V6ZK, 0)
-#define ARM_ARCH_V6T2 ARM_FEATURE (ARM_AEXT_V6T2, 0)
-#define ARM_ARCH_V6KT2 ARM_FEATURE (ARM_AEXT_V6KT2, 0)
-#define ARM_ARCH_V6ZT2 ARM_FEATURE (ARM_AEXT_V6ZT2, 0)
-#define ARM_ARCH_V6ZKT2 ARM_FEATURE (ARM_AEXT_V6ZKT2, 0)
-#define ARM_ARCH_V6M ARM_FEATURE (ARM_AEXT_V6M, 0)
-#define ARM_ARCH_V6SM ARM_FEATURE (ARM_AEXT_V6SM, 0)
-#define ARM_ARCH_V7 ARM_FEATURE (ARM_AEXT_V7, 0)
-#define ARM_ARCH_V7A ARM_FEATURE (ARM_AEXT_V7A, 0)
-#define ARM_ARCH_V7VE ARM_FEATURE (ARM_AEXT_V7VE, 0)
-#define ARM_ARCH_V7R ARM_FEATURE (ARM_AEXT_V7R, 0)
-#define ARM_ARCH_V7M ARM_FEATURE (ARM_AEXT_V7M, 0)
-#define ARM_ARCH_V7EM ARM_FEATURE (ARM_AEXT_V7EM, 0)
-#define ARM_ARCH_V8A ARM_FEATURE (ARM_AEXT_V8A, 0)
+#define ARM_ARCH_V1 ARM_FEATURE_CORE_LOW (ARM_AEXT_V1)
+#define ARM_ARCH_V2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V2)
+#define ARM_ARCH_V2S ARM_FEATURE_CORE_LOW (ARM_AEXT_V2S)
+#define ARM_ARCH_V3 ARM_FEATURE_CORE_LOW (ARM_AEXT_V3)
+#define ARM_ARCH_V3M ARM_FEATURE_CORE_LOW (ARM_AEXT_V3M)
+#define ARM_ARCH_V4xM ARM_FEATURE_CORE_LOW (ARM_AEXT_V4xM)
+#define ARM_ARCH_V4 ARM_FEATURE_CORE_LOW (ARM_AEXT_V4)
+#define ARM_ARCH_V4TxM ARM_FEATURE_CORE_LOW (ARM_AEXT_V4TxM)
+#define ARM_ARCH_V4T ARM_FEATURE_CORE_LOW (ARM_AEXT_V4T)
+#define ARM_ARCH_V5xM ARM_FEATURE_CORE_LOW (ARM_AEXT_V5xM)
+#define ARM_ARCH_V5 ARM_FEATURE_CORE_LOW (ARM_AEXT_V5)
+#define ARM_ARCH_V5TxM ARM_FEATURE_CORE_LOW (ARM_AEXT_V5TxM)
+#define ARM_ARCH_V5T ARM_FEATURE_CORE_LOW (ARM_AEXT_V5T)
+#define ARM_ARCH_V5TExP ARM_FEATURE_CORE_LOW (ARM_AEXT_V5TExP)
+#define ARM_ARCH_V5TE ARM_FEATURE_CORE_LOW (ARM_AEXT_V5TE)
+#define ARM_ARCH_V5TEJ ARM_FEATURE_CORE_LOW (ARM_AEXT_V5TEJ)
+#define ARM_ARCH_V6 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6)
+#define ARM_ARCH_V6K ARM_FEATURE_CORE_LOW (ARM_AEXT_V6K)
+#define ARM_ARCH_V6Z ARM_FEATURE_CORE_LOW (ARM_AEXT_V6Z)
+#define ARM_ARCH_V6ZK ARM_FEATURE_CORE_LOW (ARM_AEXT_V6ZK)
+#define ARM_ARCH_V6T2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6T2)
+#define ARM_ARCH_V6KT2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6KT2)
+#define ARM_ARCH_V6ZT2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6ZT2)
+#define ARM_ARCH_V6ZKT2 ARM_FEATURE_CORE_LOW (ARM_AEXT_V6ZKT2)
+#define ARM_ARCH_V6M ARM_FEATURE_CORE_LOW (ARM_AEXT_V6M)
+#define ARM_ARCH_V6SM ARM_FEATURE_CORE_LOW (ARM_AEXT_V6SM)
+#define ARM_ARCH_V7 ARM_FEATURE_CORE_LOW (ARM_AEXT_V7)
+#define ARM_ARCH_V7A ARM_FEATURE_CORE_LOW (ARM_AEXT_V7A)
+#define ARM_ARCH_V7VE ARM_FEATURE_CORE_LOW (ARM_AEXT_V7VE)
+#define ARM_ARCH_V7R ARM_FEATURE_CORE_LOW (ARM_AEXT_V7R)
+#define ARM_ARCH_V7M ARM_FEATURE_CORE_LOW (ARM_AEXT_V7M)
+#define ARM_ARCH_V7EM ARM_FEATURE_CORE_LOW (ARM_AEXT_V7EM)
+#define ARM_ARCH_V8A ARM_FEATURE_CORE_LOW (ARM_AEXT_V8A)
/* Some useful combinations: */
-#define ARM_ARCH_NONE ARM_FEATURE (0, 0)
-#define FPU_NONE ARM_FEATURE (0, 0)
-#define ARM_ANY ARM_FEATURE (-1, 0) /* Any basic core. */
-#define FPU_ANY_HARD ARM_FEATURE (0, FPU_FPA | FPU_VFP_HARD | FPU_MAVERICK)
-#define ARM_ARCH_THUMB2 ARM_FEATURE (ARM_EXT_V6T2 | ARM_EXT_V7 | ARM_EXT_V7A | ARM_EXT_V7R | ARM_EXT_V7M | ARM_EXT_DIV, 0)
+#define ARM_ARCH_NONE ARM_FEATURE_LOW (0, 0)
+#define FPU_NONE ARM_FEATURE_LOW (0, 0)
+#define ARM_ANY ARM_FEATURE (-1, -1, 0) /* Any basic core. */
+#define FPU_ANY_HARD ARM_FEATURE_COPROC (FPU_FPA | FPU_VFP_HARD | FPU_MAVERICK)
+#define ARM_ARCH_THUMB2 ARM_FEATURE_CORE_LOW (ARM_EXT_V6T2 | ARM_EXT_V7 \
+ | ARM_EXT_V7A | ARM_EXT_V7R \
+ | ARM_EXT_V7M | ARM_EXT_DIV)
/* v7-a+sec. */
-#define ARM_ARCH_V7A_SEC ARM_FEATURE (ARM_AEXT_V7A | ARM_EXT_SEC, 0)
+#define ARM_ARCH_V7A_SEC ARM_FEATURE_CORE_LOW (ARM_AEXT_V7A | ARM_EXT_SEC)
/* v7-a+mp+sec. */
#define ARM_ARCH_V7A_MP_SEC \
- ARM_FEATURE (ARM_AEXT_V7A | ARM_EXT_MP | ARM_EXT_SEC, \
- 0)
+ ARM_FEATURE_CORE_LOW (ARM_AEXT_V7A | ARM_EXT_MP | ARM_EXT_SEC)
/* v7-r+idiv. */
-#define ARM_ARCH_V7R_IDIV ARM_FEATURE (ARM_AEXT_V7R | ARM_EXT_ADIV, 0)
+#define ARM_ARCH_V7R_IDIV ARM_FEATURE_CORE_LOW (ARM_AEXT_V7R | ARM_EXT_ADIV)
/* Features that are present in v6M and v6S-M but not other v6 cores. */
-#define ARM_ARCH_V6M_ONLY ARM_FEATURE (ARM_AEXT_V6M_ONLY, 0)
+#define ARM_ARCH_V6M_ONLY ARM_FEATURE_CORE_LOW (ARM_AEXT_V6M_ONLY)
/* v8-a+fp. */
-#define ARM_ARCH_V8A_FP ARM_FEATURE (ARM_AEXT_V8A, FPU_ARCH_VFP_ARMV8)
+#define ARM_ARCH_V8A_FP ARM_FEATURE_LOW (ARM_AEXT_V8A, FPU_ARCH_VFP_ARMV8)
/* v8-a+simd (implies fp). */
-#define ARM_ARCH_V8A_SIMD ARM_FEATURE (ARM_AEXT_V8A, \
+#define ARM_ARCH_V8A_SIMD ARM_FEATURE_LOW (ARM_AEXT_V8A, \
FPU_ARCH_NEON_VFP_ARMV8)
/* v8-a+crypto (implies simd+fp). */
-#define ARM_ARCH_V8A_CRYPTOV1 ARM_FEATURE (ARM_AEXT_V8A, \
+#define ARM_ARCH_V8A_CRYPTOV1 ARM_FEATURE_LOW (ARM_AEXT_V8A, \
FPU_ARCH_CRYPTO_NEON_VFP_ARMV8)
/* There are too many feature bits to fit in a single word, so use a
- structure. For simplicity we put all core features in one word and
- everything else in the other. */
+ structure. For simplicity we put all core features in array CORE
+ and everything else in the other. All the bits in element core[0]
+ have been occupied, so new feature should use bit in element core[1]
+ and use macro ARM_FEATURE to initialize the feature set variable. */
typedef struct
{
- unsigned long core;
+ unsigned long core[2];
unsigned long coproc;
} arm_feature_set;
#define ARM_CPU_HAS_FEATURE(CPU,FEAT) \
- (((CPU).core & (FEAT).core) != 0 || ((CPU).coproc & (FEAT).coproc) != 0)
+ (((CPU).core[0] & (FEAT).core[0]) != 0 \
+ || ((CPU).core[1] & (FEAT).core[1]) != 0 \
+ || ((CPU).coproc & (FEAT).coproc) != 0)
#define ARM_CPU_IS_ANY(CPU) \
- ((CPU).core == ((arm_feature_set)ARM_ANY).core)
+ ((CPU).core[0] == ((arm_feature_set)ARM_ANY).core[0] \
+ && (CPU).core[1] == ((arm_feature_set)ARM_ANY).core[1])
#define ARM_MERGE_FEATURE_SETS(TARG,F1,F2) \
do { \
- (TARG).core = (F1).core | (F2).core; \
+ (TARG).core[0] = (F1).core[0] | (F2).core[0];\
+ (TARG).core[1] = (F1).core[1] | (F2).core[1];\
(TARG).coproc = (F1).coproc | (F2).coproc; \
} while (0)
#define ARM_CLEAR_FEATURE(TARG,F1,F2) \
do { \
- (TARG).core = (F1).core &~ (F2).core; \
+ (TARG).core[0] = (F1).core[0] &~ (F2).core[0];\
+ (TARG).core[1] = (F1).core[1] &~ (F2).core[1];\
(TARG).coproc = (F1).coproc &~ (F2).coproc; \
} while (0)
-#define ARM_FEATURE(core, coproc) {(core), (coproc)}
+#define ARM_FEATURE_COPY(F1, F2) \
+ do { \
+ (F1).core[0] = (F2).core[0]; \
+ (F1).core[1] = (F2).core[1]; \
+ (F1).coproc = (F2).coproc; \
+ } while (0)
+
+#define ARM_FEATURE_EQUAL(T1,T2) \
+ ((T1).core[0] == (T2).core[0] \
+ && (T1).core[1] == (T2).core[1] \
+ && (T1).coproc == (T2).coproc)
+
+#define ARM_FEATURE_ZERO(T) \
+ ((T).core[0] == 0 && (T).core[1] == 0 && (T).coproc == 0)
+
+#define ARM_FEATURE_CORE_EQUAL(T1, T2) \
+ ((T1).core[0] == (T2).core[0] && (T1).core[1] == (T2).core[1])
+
+#define ARM_FEATURE_LOW(core, coproc) {{(core), 0}, (coproc)}
+#define ARM_FEATURE_CORE_LOW(core) {{(core), 0}, 0}
+#define ARM_FEATURE_COPROC(coproc) {{0, 0}, (coproc)}
+#define ARM_FEATURE(core1, core2, coproc) {{(core1), (core2)}, (coproc)}