Question

I'm trying to figure out if the ASM code for the function neon_asm_convert() in the example here will run on all armv7/armv7s/arm64 processors (ie., iPhone 4S/5/5S).

Unfortunately, I don't own all of these devices, so a simple run-test is out of the question. However, I'm developing an app (testing it only using armv7) which uses the __asm__() from the neon_asm_convert(), and I would like to find out if the ASM code will also run on arm64.

I think I read that ASM code that runs on armv7/armv7s won't run on arm64 but I can't seem to find that reference anymore.

Does anyone have any pointers that cold help me out?

Was it helpful?

Solution

Looks like it's not going to run on arm64. As this answer says:

arm64 is a new ISA. The actual NEON instructions and register layout are entirely new. You will need to re-write or adapt assembly code for the new architecture.

OTHER TIPS

As Tomer said, no. arm64 is a new architecture with a new instruction syntax and register layout.

However, fast implementations of this sort of colorspace conversion are available in the SDK as part of the Accelerate.framework. Except in special circumstances, you shouldn’t need to write your own assembly code for this. Specifically, you can use the vImageConvert_AnyToAny function, which provides high-performance implementations of this and many, many other common conversions that work on all of the architectures that Apple ships (armv7, armv7s, arm64, i386, x86_64).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top