Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcc; arm64; aarch64; unrecognized command line option '-mfpu=neon'

I got compilation error:

unrecognized command line option '-mfpu=neon'*
when tried to compile with -mfpu=neon flag. Actually, any 'mfpu' options I tried failed. However in documentation this flag is mentioned, so it should be valid

What is wrong with this key? How could I tell compiler to use NEON?

Linaro GNU aarch64 linux tools 4.8 are used.

Thanks.

like image 438
user3124812 Avatar asked Apr 24 '15 15:04

user3124812


1 Answers

Advanced SIMD (aka NEON) is mandatory for AArch64, so no command line option is needed to instruct the compiler to use NEON.

If you want to enable auto vectorization optimisations so that the compiler automatically uses NEON instructions, then compile with -O3 or -O2 -ftree-vectorize.

The AArch64 and ARM backends are completely separate in gcc. The ARM back end only targets the traditional 32 bit ARM instructions sets (ARM, Thumb, Thumb-2). This is in contrast to the situation with x86, where the 32 bit and 64 bit code generation is combined into a single GCC back end.

like image 160
Charles Baylis Avatar answered Oct 01 '22 05:10

Charles Baylis