[PATCH][ARM][GAS] Add support for CRC instructions in ARMv8
Kyrylo Tkachov
kyrylo.tkachov@arm.com
Wed Feb 27 13:46:00 GMT 2013
Hi all,
This patch adds support for the ARMv8 AArch32 CRC instruction variants to
gas and objdump.
The instructions are enabled by -march=armv8-a+crc. There are A32 and T32
variants.
The instructions are of the form:
CRC32{C}<y> Rd, Rn, Rm
where <y> is one of {b, h, w}
and C is either present or not, indicating which polynomial to use in the
CRC computation.
That gives us 6 variants for each mode (ARM and Thumb2).
Using r15 in the ARM variants is unpredictable, while using either r15 or
r13 in Thumb2 mode
is unpredictable as well. Gas will warn when a user supplies these registers
but will assemble successfully.
Objudmp will warn about unpredictable behaviour when disassembling the
offending variants.
Test cases are added for the normal instruction variants and also for the
warnings.
make check-gas passes.
Ok for trunk?
Thanks,
Kyrill
gas/ChangeLog
2013-02-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/tc-arm.c (crc_ext_armv8): New feature set.
(UNPRED_REG): New macro.
(do_crc32_1): New function.
(do_crc32b, do_crc32h, do_crc32w, do_crc32cb,
do_crc32ch, do_crc32cw): Likewise.
(TUEc): New macro.
(insns): Add entries for crc32 mnemonics.
(arm_extensions): Add entry for crc.
include/opcode/ChangeLog
2013-02-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* arm.h (CRC_EXT_ARMV8): New constant.
(ARCH_CRC_ARMV8): New macro.
opcodes/ChangeLog
2013-02-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* arm-dic.c (arm_opcodes): Add entries for CRC instructions.
(thumb32_opcodes): Likewise.
(print_insn_thumb32): Handle 'S' control char.
gas/testsuite/ChangeLog
2013-02-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gas/arm/crc32-bad.d: New file.
* gas/arm/crc32-bad.l: Likewise.
* gas/arm/crc32-bad.s: Likewise.
* gas/arm/crc32.d: Likewise.
* gas/arm/crc32.s: Likewise.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crc32-gas.txt
URL: <https://sourceware.org/pipermail/binutils/attachments/20130227/dcc4345f/attachment.txt>
More information about the Binutils
mailing list