This is the mail archive of the
mailing list for the binutils project.
Re: [arm] Automatically enable CRC instructions on supported ARMv8-A CPUs
- From: Evandro Menezes <e dot menezes at samsung dot com>
- To: "Richard Earnshaw (lists)" <Richard dot Earnshaw at arm dot com>, binutils at sourceware dot org
- Cc: "philipp dot tomsich at theobroma-systems dot com" <philipp dot tomsich at theobroma-systems dot com>, jim dot wilson at linaro dot org
- Date: Wed, 07 Sep 2016 11:35:34 -0500
- Subject: Re: [arm] Automatically enable CRC instructions on supported ARMv8-A CPUs
- Authentication-results: sourceware.org; auth=none
- Cms-type: 301P
- References: <CGME20160907162633uscas1p10fe25be18c4db33c6eed955583c48eb7@uscas1p1.samsung.com> <email@example.com>
I'd think that leaving CRC implicit in ARM_ARCH_V8A and creating a new
feature that excludes it, say ARM_ARCH_V8A_NO_CRC, would reflect the
specs more closely. But I have no strong feelings about it.
On 09/07/16 11:26, Richard Earnshaw (lists) wrote:
When assembling for a named CPU we know whether or not that CPU has the
ARMv8-A CRC extension. However, this was not coded into the assembler,
requiring the user to explicitly enable this feature. Unfortunately,
GCC assumes that we know that CRC is present and so files passed through
by the compiler result in errors during assembly.
This patch fixes this by introducing a new 'architecture' containing the
CRC extension and then adjusting all the ARMv8-A cores that have this
feature (everything bar xgene1) to use the new architecture setting.
Although I don't have datasheets for all the parts I've enabled this for
the xgene2, exynos-m1 and qdf24xx parts since all of these have the
feature enabled already in the AArch64 assembler. If this is not
correct for AArch32, then please can the relevant maintainers let me know.
Tested with some simple smoke tests both using -mcpu= and .cpu directives.
* opcode/arm.h (ARM_ARCH_V8A_CRC): New architecture.
* config/tc-arm.h (arm_cpus): Use ARM_ARCH_V8A_CRC for all
ARMv8-A CPUs except xgene1.