aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMihail Ionescu <mihail.ionescu@arm.com>2019-11-22 13:44:17 +0000
committerTamar Christina <tamar.christina@arm.com>2019-11-22 13:47:26 +0000
commit8b301fbb6114faba4e95e24e3a1c3108f64885c6 (patch)
tree3dffe085e8fd31163d34995522f90f4ebf97c532 /include
parenta2e098c378a96e7d7760aa52c1b49680c67674be (diff)
downloadgdb-8b301fbb6114faba4e95e24e3a1c3108f64885c6.zip
gdb-8b301fbb6114faba4e95e24e3a1c3108f64885c6.tar.gz
gdb-8b301fbb6114faba4e95e24e3a1c3108f64885c6.tar.bz2
Arm: Change CRC from fpu feature to archititectural extension
This patch changes the CRC extension to use the core feature bits instead of the coproc/fpu feature bits. CRC is not an fpu feature and it causes issues with the new fpu reset patch (f439988037a589de3798f44e7268301adaec21a9). CRC can be set using the '.arch_extension' directive, which sets bits in the coproc bitfield. When a '.fpu' directive is encountered, the CRC feature bit gets removed and there is no way to set it back using '.fpu'. With this patch, CRC will be marked in the feature core bits, which prevents it from getting removed when setting/changing the fpu options. gas/ChangeLog: * config/tc-arm.c (arm_ext_crc): New. (crc_ext_armv8): Remove. (insns): Rename crc_ext_armv8 to arm_ext_crc. (arm_cpus): Replace CRC_EXT_ARMV8 with ARM_EXT2_CRC. (armv8a_ext_table, armv8r_ext_table, arm_option_extension_value_table): Redefine the crc extension in terms of ARM_EXT2_CRC. * gas/testsuite/gas/arm/crc-ext.s: New. * gas/testsuite/gas/arm/crc-ext.d: New. include/ChangeLog: * opcode/arm.h (ARM_EXT2_CRC): New extension feature to replace CRC_EXT_ARMV8. (CRC_EXT_ARMV8): Remove and mark bit as unused. (ARM_ARCH_V8A_CRC, ARM_ARCH_V8_1A, ARM_ARCH_V8_2A, ARM_ARCH_V8_3A, ARM_ARCH_V8_4A, ARM_ARCH_V8_5A, ARM_ARCH_V8_6A): Redefine using ARM_EXT2_CRC instead of CRC_EXT_ARMV8. opcodes/ChangeLog: * opcodes/arm-dis.c (arm_opcodes, thumb32_opcodes): Change the coproc CRC conditions to use the extension feature set, second word, base on ARM_EXT2_CRC.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog10
-rw-r--r--include/opcode/arm.h32
2 files changed, 26 insertions, 16 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index bfbf2bd..3ead011 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,13 @@
+2019-11-22 Mihail Ionescu <mihail.ionescu@arm.com>
+
+ * opcode/arm.h (ARM_EXT2_CRC): New extension feature
+ to replace CRC_EXT_ARMV8.
+ (CRC_EXT_ARMV8): Remove and mark bit as unused.
+ (ARM_ARCH_V8A_CRC, ARM_ARCH_V8_1A, ARM_ARCH_V8_2A,
+ ARM_ARCH_V8_3A, ARM_ARCH_V8_4A, ARM_ARCH_V8_5A,
+ ARM_ARCH_V8_6A): Redefine using ARM_EXT2_CRC instead of
+ CRC_EXT_ARMV8.
+
2019-11-18 Andrew Burgess <andrew.burgess@embecosm.com>
* dwarf2.h (DW_CIE_VERSION): Delete.
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 982da5a..14bd1d1 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -76,6 +76,7 @@
#define ARM_EXT2_V8_6A 0x00010000 /* ARM V8.6A. */
#define ARM_EXT2_BF16 0x00020000 /* ARMv8 bfloat16. */
#define ARM_EXT2_I8MM 0x00040000 /* ARMv8.6A i8mm. */
+#define ARM_EXT2_CRC 0x00080000 /* ARMv8 CRC32 */
/* Co-processor space extensions. */
#define ARM_CEXT_XSCALE 0x00000001 /* Allow MIA etc. */
@@ -102,7 +103,7 @@
#define FPU_VFP_EXT_ARMV8 0x00020000 /* Double-precision FP for ARMv8. */
#define FPU_NEON_EXT_ARMV8 0x00010000 /* Neon for ARMv8. */
#define FPU_CRYPTO_EXT_ARMV8 0x00008000 /* Crypto for ARMv8. */
-#define CRC_EXT_ARMV8 0x00004000 /* CRC32 for ARMv8. */
+/* Unused 0x00004000 */
#define FPU_VFP_EXT_ARMV8xD 0x00002000 /* Single-precision FP for ARMv8. */
#define FPU_NEON_EXT_RDMA 0x00001000 /* v8.1 Adv.SIMD extensions. */
#define FPU_NEON_EXT_DOTPROD 0x00000800 /* Dot Product extension. */
@@ -273,7 +274,6 @@
| FPU_NEON_ARMV8 \
| FPU_VFP_ARMV8 \
| FPU_NEON_EXT_DOTPROD)
-#define ARCH_CRC_ARMV8 ARM_FEATURE_COPROC (CRC_EXT_ARMV8)
#define FPU_ARCH_NEON_VFP_ARMV8_1 \
ARM_FEATURE_COPROC (FPU_NEON_ARMV8_1 \
| FPU_VFP_ARMV8)
@@ -342,22 +342,22 @@
#define ARM_ARCH_V7M ARM_FEATURE_CORE (ARM_AEXT_V7M, ARM_EXT2_V6T2_V8M)
#define ARM_ARCH_V7EM ARM_FEATURE_CORE (ARM_AEXT_V7EM, ARM_EXT2_V6T2_V8M)
#define ARM_ARCH_V8A ARM_FEATURE_CORE (ARM_AEXT_V8A, ARM_AEXT2_V8A)
-#define ARM_ARCH_V8A_CRC ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8A, \
- CRC_EXT_ARMV8)
-#define ARM_ARCH_V8_1A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_1A, \
- CRC_EXT_ARMV8 | FPU_NEON_EXT_RDMA)
-#define ARM_ARCH_V8_2A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_2A, \
- CRC_EXT_ARMV8 | FPU_NEON_EXT_RDMA)
-#define ARM_ARCH_V8_3A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_3A, \
- CRC_EXT_ARMV8 | FPU_NEON_EXT_RDMA)
-#define ARM_ARCH_V8_4A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_4A, \
- CRC_EXT_ARMV8 | FPU_NEON_EXT_RDMA \
+#define ARM_ARCH_V8A_CRC ARM_FEATURE (ARM_AEXT_V8A, \
+ ARM_AEXT2_V8A | ARM_EXT2_CRC)
+#define ARM_ARCH_V8_1A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_1A \
+ | ARM_EXT2_CRC, FPU_NEON_EXT_RDMA)
+#define ARM_ARCH_V8_2A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_2A \
+ | ARM_EXT2_CRC, FPU_NEON_EXT_RDMA)
+#define ARM_ARCH_V8_3A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_3A \
+ | ARM_EXT2_CRC, FPU_NEON_EXT_RDMA)
+#define ARM_ARCH_V8_4A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_4A \
+ | ARM_EXT2_CRC, FPU_NEON_EXT_RDMA \
| FPU_NEON_EXT_DOTPROD)
-#define ARM_ARCH_V8_5A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_5A, \
- CRC_EXT_ARMV8 | FPU_NEON_EXT_RDMA \
+#define ARM_ARCH_V8_5A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_5A \
+ | ARM_EXT2_CRC, FPU_NEON_EXT_RDMA \
| FPU_NEON_EXT_DOTPROD)
-#define ARM_ARCH_V8_6A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_6A, \
- CRC_EXT_ARMV8 | FPU_NEON_EXT_RDMA \
+#define ARM_ARCH_V8_6A ARM_FEATURE (ARM_AEXT_V8A, ARM_AEXT2_V8_6A \
+ | ARM_EXT2_CRC, FPU_NEON_EXT_RDMA \
| FPU_NEON_EXT_DOTPROD)
#define ARM_ARCH_V8M_BASE ARM_FEATURE_CORE (ARM_AEXT_V8M_BASE, \
ARM_AEXT2_V8M_BASE)