aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Preud'homme <thomas.preudhomme@arm.com>2016-05-10 15:06:41 +0100
committerThomas Preud'homme <thomas.preudhomme@arm.com>2016-05-10 15:12:11 +0100
commitd942732e829030b8eab483dd48b979f8eed7c9e2 (patch)
treeb230627703c7c9663858720b3ea476d08b4c048e /include
parent16a1fa25be5705102b84ef0ea6eea71312328c2c (diff)
downloadgdb-d942732e829030b8eab483dd48b979f8eed7c9e2.zip
gdb-d942732e829030b8eab483dd48b979f8eed7c9e2.tar.gz
gdb-d942732e829030b8eab483dd48b979f8eed7c9e2.tar.bz2
Allow extension availability to depend on several architecture bits
2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com> gas/ * config/tc-arm.c (struct arm_option_extension_value_table): Make allowed_archs an array with 2 entries. (ARM_EXT_OPT): Adapt to only fill the first entry of allowed_archs. (ARM_EXT_OPT2): New macro filling the two entries of allowed_archs. (arm_extensions): Use separate entries in allowed_archs when several archs are allowed to use an extension and change ARCH_ANY in ARM_ARCH_NONE in allowed_archs. (arm_parse_extension): Check that, for each allowed_archs entry, all bits are set in the current architecture, ignoring ARM_ANY entries. (s_arm_arch_extension): Likewise. include/ * arm.h (ARM_FSET_CPU_SUBSET): Define macro.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/opcode/arm.h6
2 files changed, 10 insertions, 0 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index c9668e4..eef571b 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,5 +1,9 @@
2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
+ * arm.h (ARM_FSET_CPU_SUBSET): Define macro.
+
+2016-05-10 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
* opcode/arm.h (ARM_EXT2_V8M_MAIN): new feature bit.
(ARM_AEXT2_V8M_MAIN): New architecture extension feature set.
(ARM_ARCH_V8M_MAIN): Use ARM_AEXT2_V8M_MAIN instead of ARM_AEXT2_V8M
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 36dcc20..c8883db 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -330,6 +330,12 @@ typedef struct
|| ((CPU).core[1] & (FEAT).core[1]) != 0 \
|| ((CPU).coproc & (FEAT).coproc) != 0)
+/* Tests whether the features of A are a subset of B. */
+#define ARM_FSET_CPU_SUBSET(A,B) \
+ (((A).core[0] & (B).core[0]) == (A).core[0] \
+ && ((A).core[1] & (B).core[1]) == (A).core[1] \
+ && ((A).coproc & (B).coproc) == (A).coproc)
+
#define ARM_CPU_IS_ANY(CPU) \
((CPU).core[0] == ((arm_feature_set)ARM_ANY).core[0] \
&& (CPU).core[1] == ((arm_feature_set)ARM_ANY).core[1])