On 20/07/16 22:33, Jim Wilson wrote:
On Wed, Jul 20, 2016 at 2:14 PM, Jeffrey Walton noloader@gmail.com wrote:
I'm having trouble with ARMv8/Aarch64. One is an early Mustang server
ARMv8 implies 32-bit code (aarch32). Aaarch64 implies 64-bit code. These are two different compilers, with two different sets of command line options.
Er, no. ARMv8 (pedantically ARMv8-A, since there are also ARMv8-R and ARMv8-M specifications as well) is an architecture, not an ISA. The ARMv8 architecture defines two execution modes: AArch32 and AArch64. The AArch32 execution mode further has to states with separate ISAs: A32 and T32, more traditionally known as ARM and Thumb states.
GCC has two separate compilers for ARMv8. One handles the AArch32 execution mode (configurations based arm-*-* for legacy reasons) and the other AArch64 (configurations based on aarch64-*-*).
The -mfpu option only applies to the AArch32 compiler.
R.
$ g++ -DDEBUG -g3 -O0 -mfpu=neon-fp-armv8 -fPIC -pipe -c cryptlib.cpp g++: error: unrecognized command line option ‘-mfpu=neon-fp-armv8’ GNUmakefile:753: recipe for target 'cryptlib.o' failed
-mfpu=neon-fp-armv8 is an arm (32-bit) compiler option. The aarch64 (64-bit) compiler will not accept it.
Because FP and Neon support is optional in the 32-bit arm architecture, there are compiler options to enable fp and/or neon support. Usually FP support is enabled by default for a linux distro, but the neon support usually is not, and you can enable neon by using this -mcpu=neon-fp-armv8 option if running 32-bit code on an ARMv8 architecture part.
Meanwhile, the aarch64 spec requires FP and ASIMD instruction support in the linux ABI, so there are no options to enable them, they are on by default. If you really want to disable them, you can do so by using a -march= option, e.g. -march=aarch64+fp+simd enables them, and -march=aarch64+nofp+nosimd disables them. However, if you disable fp support, you will break the ABI, and your code may not compile or run, so don't do that unless perhaps you have an embedded target, and have your own OS build and your own ABI. or no code that uses FP You can also enable/.disable crc (crypto) support this way, but a better way is to use a -mcpu= option, and let gcc figure out if the target has crc instructions.
See the aarch64 compiler docs here https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#AArch64-Options
Jim _______________________________________________ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-toolchain
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.