This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug target/72736] New: warning: switch -mcpu=cortex-a53 conflicts with -march=armv8-a switch


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72736

            Bug ID: 72736
           Summary: warning: switch -mcpu=cortex-a53 conflicts with
                    -march=armv8-a switch
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: noloader at gmail dot com
  Target Milestone: ---

This looks like an issue similar to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57907. My apologies if it has
already been fixed.

Raspberry recently released the Raspberry Pi 3. Its an ARMv8 SoC by Broadcom
based on the A-53 core. Raspberry is resisting an 64-bit Aarch64 image, so we
have to use an 32-bit image and toolchain. Fortunately, Aarch32 has the
necessary instructions, too (but with a different encoding). Also see
https://community.arm.com/groups/android-community/blog/2015/03/27/arm-neon-programming-quick-reference
.

Attempting to compile in this configuration results in:

$ cat test.cc
int main(int argc, char* argv[])
{
  return 0;
}

$ gcc -march=armv8-a -mcpu=cortex-a53 test.cc -o test.exe
test.cc:1:0: warning: switch -mcpu=cortex-a53 conflicts with -march=armv8-a
switch
 int main(int argc, char* argv[])
 ^

The same thing applies as in the 57907. The manual seems to indicate its a
supported configuration. And the comments apply as well. There are some
optional instructions that may not be present in a baseline A53.

**********

What I am ultimately after here is access to the PMULL, PMULL2, AES, SHA1 and
SHA2 intrinsics. But alas, that does not want to compile:

$ gcc -march=armv8-a+crc+crypto -mcpu=cortex-a53 test.cc -o test.exe
gcc: error: unrecognized argument in option ‘-march=armv8-a+crc+crypto’
gcc: note: valid arguments to ‘-march=’ are: armv2 armv2a armv3 armv3m armv4
armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2
armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a
armv8-a+crc iwmmxt iwmmxt2 native

**********

$ gcc --version
gcc (Raspbian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.

**********

And here's another attempt to enable CRC and Crypto. I'm probably going to have
to take this to the GCC mailing list for help.

raspberrypi:cryptopp-gcm$ gcc -D__ARM_FEATURE_CRYPTO -D__ARM_FEATURE_CRC
-march=armv8-a -mcpu=cortex-a53 -mfpu=neon test.cc -o test.exe
test.cc:1:0: warning: switch -mcpu=cortex-a53 conflicts with -march=armv8-a
switch
 #include <arm_neon.h>
 ^
In file included from test.cc:1:0:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint8x16_t vaeseq_u8(uint8x16_t, uint8x16_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13707:50: error:
‘__builtin_arm_crypto_aese’ was not declared in this scope
   return __builtin_arm_crypto_aese (__data, __key);
                                                  ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint8x16_t vaesdq_u8(uint8x16_t, uint8x16_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13713:50: error:
‘__builtin_arm_crypto_aesd’ was not declared in this scope
   return __builtin_arm_crypto_aesd (__data, __key);
                                                  ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint8x16_t vaesmcq_u8(uint8x16_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13719:44: error:
‘__builtin_arm_crypto_aesmc’ was not declared in this scope
   return __builtin_arm_crypto_aesmc (__data);
                                            ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint8x16_t vaesimcq_u8(uint8x16_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13725:45: error:
‘__builtin_arm_crypto_aesimc’ was not declared in this scope
   return __builtin_arm_crypto_aesimc (__data);
                                             ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function ‘uint32_t
vsha1h_u32(uint32_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13733:40: error:
‘__builtin_arm_crypto_sha1h’ was not declared in this scope
   __t = __builtin_arm_crypto_sha1h (__t);
                                        ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha1cq_u32(uint32x4_t, uint32_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13742:60: error:
‘__builtin_arm_crypto_sha1c’ was not declared in this scope
   return __builtin_arm_crypto_sha1c (__hash_abcd, __t, __wk);
                                                            ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha1pq_u32(uint32x4_t, uint32_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13750:60: error:
‘__builtin_arm_crypto_sha1p’ was not declared in this scope
   return __builtin_arm_crypto_sha1p (__hash_abcd, __t, __wk);
                                                            ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha1mq_u32(uint32x4_t, uint32_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13758:60: error:
‘__builtin_arm_crypto_sha1m’ was not declared in this scope
   return __builtin_arm_crypto_sha1m (__hash_abcd, __t, __wk);
                                                            ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha1su0q_u32(uint32x4_t, uint32x4_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13764:63: error:
‘__builtin_arm_crypto_sha1su0’ was not declared in this scope
   return __builtin_arm_crypto_sha1su0 (__w0_3, __w4_7, __w8_11);
                                                               ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha1su1q_u32(uint32x4_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13770:57: error:
‘__builtin_arm_crypto_sha1su1’ was not declared in this scope
   return __builtin_arm_crypto_sha1su1 (__tw0_3, __w12_15);
                                                         ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha256hq_u32(uint32x4_t, uint32x4_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13776:70: error:
‘__builtin_arm_crypto_sha256h’ was not declared in this scope
   return __builtin_arm_crypto_sha256h (__hash_abcd, __hash_efgh, __wk);
                                                                      ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha256h2q_u32(uint32x4_t, uint32x4_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13782:71: error:
‘__builtin_arm_crypto_sha256h2’ was not declared in this scope
   return __builtin_arm_crypto_sha256h2 (__hash_abcd, __hash_efgh, __wk);
                                                                       ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha256su0q_u32(uint32x4_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13788:56: error:
‘__builtin_arm_crypto_sha256su0’ was not declared in this scope
   return __builtin_arm_crypto_sha256su0 (__w0_3, __w4_7);
                                                        ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function
‘uint32x4_t vsha256su1q_u32(uint32x4_t, uint32x4_t, uint32x4_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13794:68: error:
‘__builtin_arm_crypto_sha256su1’ was not declared in this scope
   return __builtin_arm_crypto_sha256su1 (__tw0_3, __w8_11, __w12_15);
                                                                    ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function ‘poly128_t
vmull_p64(poly64_t, poly64_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13800:83: error:
‘__builtin_arm_crypto_vmullp64’ was not declared in this scope
   return (poly128_t) __builtin_arm_crypto_vmullp64 ((uint64_t) __a, (uint64_t)
__b);
                                                                               
   ^
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h: In function ‘poly128_t
vmull_high_p64(poly64x2_t, poly64x2_t)’:
/usr/lib/gcc/arm-linux-gnueabihf/4.9/include/arm_neon.h:13809:85: error:
‘__builtin_arm_crypto_vmullp64’ was not declared in this scope
   return (poly128_t) __builtin_arm_crypto_vmullp64 ((uint64_t) __t1,
(uint64_t) __t2);
                                                                               
     ^
raspberrypi:cryptopp-gcm$

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