This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][ARM][GAS] Add support for CRC instructions in ARMv8


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.

Attachment: crc32-gas.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]