Hello,
I am currently porting some code from iOS to Android using the NDK.
I have a third-party optimization library for ARMv7 NEON, everything compiles fine except one instruction.
I used the clang toolchain for compiling th .cc and .s files as I need it for C++11 support.
Application.mk
NDK_TOOLCHAIN_VERSION := clang
APP_ABI := armeabi-v7a
APP_STL := gnustl_static
Android.mk (stripped, only CFLAGS):
LOCAL_CFLAGS := -mfloat-abi=softfp -mfpu=neon -marm -march=armv7-a
Back to the issue, this instruction do not compile:
vld1.32 {q0[]},[r9]!
I want to load one 32-bit float 'x' from [r9] (increment after) to all lanes of quad register q0 so it is: q0 = { x, x, x, x }.
Note the [ ] meaning the only loaded value is duplicated across the register.
This instruction compiles and work fine on iOS (armv7). I think it's mostly a syntax problem but I followed the NEON reference document,
so I'm not sure what is wrong with it.
The error is:
armv7_basics.s:4135: Error: only D registers may be indexed `vld1.32 {q0[]},[r9]!
It seems to expect a register index. It should compile just fine, but I might be wrong with the syntax the NDK assembler expects.
I tried with the gcc toolchain and I get the same error (plus extra comment syntax funkiness, // vs @)
Thank you !
Regards, mg.