diff options
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 12 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 33 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/crc-ext.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/crc-ext.s | 19 |
4 files changed, 62 insertions, 16 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 9117918..1eefec9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,15 @@ +2019-11-22 Mihail Ionescu <mihail.ionescu@arm.com> + + * 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. + 2019-11-20 Alan Modra <amodra@gmail.com> PR 24944 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), diff --git a/gas/testsuite/gas/arm/crc-ext.d b/gas/testsuite/gas/arm/crc-ext.d new file mode 100644 index 0000000..0075b8b --- /dev/null +++ b/gas/testsuite/gas/arm/crc-ext.d @@ -0,0 +1,14 @@ +#as: -mno-warn-deprecated +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +00000000 <\.text>: + *[0-9a-f]+: e1400042 crc32w r0, r0, r2 + *[0-9a-f]+: e1400042 crc32w r0, r0, r2 + *[0-9a-f]+: e1400042 crc32w r0, r0, r2 + *[0-9a-f]+: e1400042 crc32w r0, r0, r2 + *[0-9a-f]+: e1400042 crc32w r0, r0, r2 + *[0-9a-f]+: e1400042 crc32w r0, r0, r2 diff --git a/gas/testsuite/gas/arm/crc-ext.s b/gas/testsuite/gas/arm/crc-ext.s new file mode 100644 index 0000000..3f0cdb0 --- /dev/null +++ b/gas/testsuite/gas/arm/crc-ext.s @@ -0,0 +1,19 @@ +.text +.arch armv8-a +.arch_extension crc +crc32w r0,r0,r2 + +.fpu crypto-neon-fp-armv8 +crc32w r0,r0,r2 + +.arch armv8.1-a +crc32w r0,r0,r2 + +.cpu cortex-a53 +crc32w r0,r0,r2 + +.cpu cortex-a55 +crc32w r0,r0,r2 + +.cpu cortex-a57 +crc32w r0,r0,r2 |