diff mbox

[AArch64,1/3] Enable CRC by default for armv8.1-a

Message ID 1459937403-22657-2-git-send-email-james.greenhalgh@arm.com
State New
Headers show

Commit Message

James Greenhalgh April 6, 2016, 10:10 a.m. UTC
Hi,

This change reflects binutils support for CRC, where it is always enabled
for armv8.1-a.

OK?

Thanks,
James

---
2016-04-06  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.h (AARCH64_FL_FOR_ARCH8_1): Also add
	AARCH64_FL_CRC.

Comments

Christophe Lyon April 7, 2016, 3:23 p.m. UTC | #1
On 6 April 2016 at 12:10, James Greenhalgh <james.greenhalgh@arm.com> wrote:
>
> Hi,
>
> This change reflects binutils support for CRC, where it is always enabled
> for armv8.1-a.
>

Does v8.1 always enable CRC?

If not, then don't you want to change the binutils default instead?

Christophe.

> OK?
>
> Thanks,
> James
>
> ---
> 2016-04-06  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * config/aarch64/aarch64.h (AARCH64_FL_FOR_ARCH8_1): Also add
>         AARCH64_FL_CRC.
>
James Greenhalgh April 7, 2016, 4:51 p.m. UTC | #2
On Thu, Apr 07, 2016 at 05:23:59PM +0200, Christophe Lyon wrote:
> On 6 April 2016 at 12:10, James Greenhalgh <james.greenhalgh@arm.com> wrote:
> >
> > Hi,
> >
> > This change reflects binutils support for CRC, where it is always enabled
> > for armv8.1-a.
> >
> 
> Does v8.1 always enable CRC?

Yes. -march=armv8.1-a should always enable CRC. Unfortunately some
binutils versions do not honour this, which is why in the next patch we
must always put +crc out.

> If not, then don't you want to change the binutils default instead?

No, this patch is the correct thing to do - regadless of what binutils does,
GCC should enable access to the CRC intrinsics with -march=armv8.1-a, so we
want this patch.

Thanks,
James

> > ---
> > 2016-04-06  James Greenhalgh  <james.greenhalgh@arm.com>
> >
> >         * config/aarch64/aarch64.h (AARCH64_FL_FOR_ARCH8_1): Also add
> >         AARCH64_FL_CRC.
> >
diff mbox

Patch

diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 7750d1c..15d7e40 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -145,7 +145,7 @@  extern unsigned aarch64_architecture_version;
 /* Architecture flags that effect instruction selection.  */
 #define AARCH64_FL_FOR_ARCH8       (AARCH64_FL_FPSIMD)
 #define AARCH64_FL_FOR_ARCH8_1			       \
-  (AARCH64_FL_FOR_ARCH8 | AARCH64_FL_LSE | AARCH64_FL_V8_1)
+  (AARCH64_FL_FOR_ARCH8 | AARCH64_FL_LSE | AARCH64_FL_CRC | AARCH64_FL_V8_1)
 
 /* Macros to test ISA flags.  */