How to enable Neon instruction in Xcode

2019-04-30 02:19发布

问题:

I want to use Neon SIMD instruction for the iphone. I heard we have to put flags "-mfloat-abi=softfp -mfpu=neon" in the "Other C Flags" field of the Target inspector, but when building I get "error: unrecognized command line option "-mfpu=neon"" .

Is there anything else special that has to be done to allow this flag? (I have Xcode 3.2.1 and iphone sdk 3.1.3)

Thanks !!

回答1:

The NEON set is an extension on the Cortex-A series, therefore not supported in iPhone 3G. You probably cannot specify this directly.



回答2:

NEON is enabled by default.

The target has to be ARMv7 for that. (3GS or later)

In order to utilize NEON, the easiest way is writing assembly codes with NEON instructions.

It isn't that hard. ARM provides NEON guide in PDF on their homepage.