diff options
author | Mihail Ionescu <mihail.ionescu@arm.com> | 2019-11-22 13:44:17 +0000 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2019-11-22 13:47:26 +0000 |
commit | 8b301fbb6114faba4e95e24e3a1c3108f64885c6 (patch) | |
tree | 3dffe085e8fd31163d34995522f90f4ebf97c532 /gas/config | |
parent | a2e098c378a96e7d7760aa52c1b49680c67674be (diff) | |
download | gdb-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 'gas/config')
-rw-r--r-- | gas/config/tc-arm.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 641ce7e..28dc624 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -279,6 +279,8 @@ static const arm_feature_set arm_ext_bf16 = ARM_FEATURE_CORE_HIGH (ARM_EXT2_BF16); static const arm_feature_set arm_ext_i8mm = ARM_FEATURE_CORE_HIGH (ARM_EXT2_I8MM); +static const arm_feature_set arm_ext_crc = + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC); static const arm_feature_set arm_arch_any = ARM_ANY; static const arm_feature_set fpu_any = FPU_ANY; @@ -334,8 +336,6 @@ static const arm_feature_set fpu_neon_ext_armv8 = ARM_FEATURE_COPROC (FPU_NEON_EXT_ARMV8); static const arm_feature_set fpu_crypto_ext_armv8 = ARM_FEATURE_COPROC (FPU_CRYPTO_EXT_ARMV8); -static const arm_feature_set crc_ext_armv8 = - ARM_FEATURE_COPROC (CRC_EXT_ARMV8); static const arm_feature_set fpu_neon_ext_v8_1 = ARM_FEATURE_COPROC (FPU_NEON_EXT_RDMA); static const arm_feature_set fpu_neon_ext_dotprod = @@ -24502,9 +24502,9 @@ static const struct asm_opcode insns[] = nUF(sha256su0, _sha2op, 2, (RNQ, RNQ), sha256su0), #undef ARM_VARIANT -#define ARM_VARIANT & crc_ext_armv8 +#define ARM_VARIANT & arm_ext_crc #undef THUMB_VARIANT -#define THUMB_VARIANT & crc_ext_armv8 +#define THUMB_VARIANT & arm_ext_crc TUEc("crc32b", 1000040, fac0f080, 3, (RR, oRR, RR), crc32b), TUEc("crc32h", 1200040, fac0f090, 3, (RR, oRR, RR), crc32h), TUEc("crc32w", 1400040, fac0f0a0, 3, (RR, oRR, RR), crc32w), @@ -30946,25 +30946,25 @@ static const struct arm_cpu_option_table arm_cpus[] = ARM_ARCH_NONE, FPU_ARCH_NEON_VFP_V4), ARM_CPU_OPT ("cortex-a32", "Cortex-A32", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("cortex-a35", "Cortex-A35", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("cortex-a53", "Cortex-A53", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("cortex-a55", "Cortex-A55", ARM_ARCH_V8_2A, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_DOTPROD), ARM_CPU_OPT ("cortex-a57", "Cortex-A57", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("cortex-a72", "Cortex-A72", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("cortex-a73", "Cortex-A73", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("cortex-a75", "Cortex-A75", ARM_ARCH_V8_2A, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST), @@ -30997,7 +30997,7 @@ static const struct arm_cpu_option_table arm_cpus[] = ARM_FEATURE_CORE_LOW (ARM_EXT_ADIV), FPU_ARCH_VFP_V3D16), ARM_CPU_OPT ("cortex-r52", "Cortex-R52", ARM_ARCH_V8R, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_NEON_VFP_ARMV8), ARM_CPU_OPT ("cortex-m35p", "Cortex-M35P", ARM_ARCH_V8M_MAIN, ARM_FEATURE_CORE_LOW (ARM_EXT_V5ExP | ARM_EXT_V6_DSP), @@ -31027,7 +31027,7 @@ static const struct arm_cpu_option_table arm_cpus[] = ARM_ARCH_NONE, FPU_NONE), ARM_CPU_OPT ("exynos-m1", "Samsung Exynos M1", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("neoverse-n1", "Neoverse N1", ARM_ARCH_V8_2A, ARM_FEATURE_CORE_HIGH (ARM_EXT2_FP16_INST), @@ -31066,7 +31066,7 @@ static const struct arm_cpu_option_table arm_cpus[] = ARM_ARCH_NONE, FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), ARM_CPU_OPT ("xgene2", "APM X-Gene 2", ARM_ARCH_V8A, - ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC), FPU_ARCH_CRYPTO_NEON_VFP_ARMV8), { NULL, 0, ARM_ARCH_NONE, ARM_ARCH_NONE, ARM_ARCH_NONE, NULL } @@ -31186,7 +31186,7 @@ static const struct arm_ext_table armv7em_ext_table[] = static const struct arm_ext_table armv8a_ext_table[] = { - ARM_ADD ("crc", ARCH_CRC_ARMV8), + ARM_ADD ("crc", ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC)), ARM_ADD ("simd", FPU_ARCH_NEON_VFP_ARMV8), ARM_EXT ("crypto", FPU_ARCH_CRYPTO_NEON_VFP_ARMV8, ARM_FEATURE_COPROC (FPU_CRYPTO_ARMV8)), @@ -31302,7 +31302,7 @@ static const struct arm_ext_table armv8_1m_main_ext_table[] = static const struct arm_ext_table armv8r_ext_table[] = { - ARM_ADD ("crc", ARCH_CRC_ARMV8), + ARM_ADD ("crc", ARM_FEATURE_CORE_HIGH (ARM_EXT2_CRC)), ARM_ADD ("simd", FPU_ARCH_NEON_VFP_ARMV8), ARM_EXT ("crypto", FPU_ARCH_CRYPTO_NEON_VFP_ARMV8, ARM_FEATURE_COPROC (FPU_CRYPTO_ARMV8)), @@ -31407,7 +31407,8 @@ struct arm_option_extension_value_table use the context sensitive approach using arm_ext_table's. */ static const struct arm_option_extension_value_table arm_extensions[] = { - ARM_EXT_OPT ("crc", ARCH_CRC_ARMV8, ARM_FEATURE_COPROC (CRC_EXT_ARMV8), + ARM_EXT_OPT ("crc", ARM_FEATURE_CORE_HIGH(ARM_EXT2_CRC), + ARM_FEATURE_CORE_HIGH(ARM_EXT2_CRC), ARM_FEATURE_CORE_LOW (ARM_EXT_V8)), ARM_EXT_OPT ("crypto", FPU_ARCH_CRYPTO_NEON_VFP_ARMV8, ARM_FEATURE_COPROC (FPU_CRYPTO_ARMV8), |