6

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 !!

Krav
  • 61
  • 1
  • 2

2 Answers2

1

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

Nick Toumpelis
  • 2,717
  • 22
  • 38
1

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.

Jake 'Alquimista' LEE
  • 6,197
  • 2
  • 17
  • 25
  • Can you point any documentation saying that NEON is enabled "by default". because for most ARM compilers, you have to define explicitely these options : -mfloat-abi=softfp -mfpu=neon. – Albrecht Andrzejewski Nov 03 '11 at 17:22
  • Set the targer as ARMv7 only. Then you can write codes for NEON - native, inline or intrinsics without modifying any compiler options. Be aware that the simulator won't work then. – Jake 'Alquimista' LEE Nov 04 '11 at 20:47
  • gcc and clang both support intrinsics for NEON instructions. Using assembly is, at least in 2013, unnecessary. http://gcc.gnu.org/onlinedocs/gcc/ARM-NEON-Intrinsics.html – Brent Jul 11 '13 at 17:20
  • If you want to waste your time with intrinsics, be my guest. It's not my problem. – Jake 'Alquimista' LEE Jul 11 '13 at 23:06