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/testsuite | |
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/testsuite')
-rw-r--r-- | gas/testsuite/gas/arm/crc-ext.d | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/crc-ext.s | 19 |
2 files changed, 33 insertions, 0 deletions
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 |