ARM NEON assembly on Windows Phone 8 not working

纵饮孤独 提交于 2019-12-05 11:25:16

VS 2012 by default produces thumb code for both Windows RT and Windows Phone 8 so the error you got is probably caused by calling into arm code from thumb code. You have two options:
1. Switch from thumb mode to arm mode before calling your function (you can use BX asm instruction for it), or
2. You can try to rewrite your NEON code in C++ using ARM/NEON intrinsics - they are supported by VS 2012. Just include "arm_neon.h" and you're done.
For the ARM intrinsics reference check out the following link: http://msdn.microsoft.com/en-us/library/hh875058.aspx
For NEON intrinsics reference check out this link: http://infocenter.arm.com/help/topic/com.arm.doc.dui0491c/DUI0491C_arm_compiler_reference.pdf

These NEON intrinsics from the link above are generally supported by VS 2012, there might be some small differences though - if unsure, check the "arm_neon.h" include to find out.

You could start your assembly code with a bx instruction in Thumb mode and simply branch to the ARM part in the same source file.

And you don't have to switch back to Thumb mode at the end since you'll finish the ARM function in bx or pop {pc} anyway which does the switching automatically.

My answer is WAAAAAAY late, but I'm really curious if it works on a WP. (I don't have any)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!