This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Recompile neon 32bit instruction for ARMv8 using ndk r10c

Hello,

I have an android application which has neon optimised native code. The neon instructions were written for armv7a architecture. I've read that ARMv8 arch can run  in both 32bit mode and 64bit mode. I've been trying to compile the code using ndk-r10c for ARMv8 but I didn't find any compiler flag to build in 32bit mode. While I was experimenting, I changed APP_ABI from armeabi-v7a to ARM64-v8a in Application.mk and received error stating that neon is not supported. Later I disabled -mfpu=neon cflag in Android.mk, error shown was unknown mnemonics for all the neon assembly instructions

So following are my questions....

1) What are the proper flags to be set to build using ndk-r10c

2) or the code built for armeabi-v7a will run as it is on ARMv8

3) if 2 is true then can a combination of 32bit built and 64bit built so work together.

Thanks

Vidit

Parents
  • Hello,

    If I understand correctly you're trying to build NEON assembly written for armv7 into an armv8-AArch64 application. If it is the case, this is unfortunately not possible.

    You can build your application as 32-bit, you're very likely to be able to run it on an armv8 platform (only very few obscure features cause difficulties).

    If you want to build your application as 64-bit:

    - convert your code to 64-bit NEON assembly

    - or (probably) better: rewrite the code using NEON intrinsics which you can compile for 32-bit and 64-bit.

    Hope this helps.

    Regards,

    Kévin

Reply
  • Hello,

    If I understand correctly you're trying to build NEON assembly written for armv7 into an armv8-AArch64 application. If it is the case, this is unfortunately not possible.

    You can build your application as 32-bit, you're very likely to be able to run it on an armv8 platform (only very few obscure features cause difficulties).

    If you want to build your application as 64-bit:

    - convert your code to 64-bit NEON assembly

    - or (probably) better: rewrite the code using NEON intrinsics which you can compile for 32-bit and 64-bit.

    Hope this helps.

    Regards,

    Kévin

Children