在Windows Phone 8的ARM NEON装配不工作

编程入门 行业动态 更新时间:2024-10-11 19:15:53
本文介绍了在Windows Phone 8的ARM NEON装配不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图调用一个函数是ARM NEON汇编codeD在.s文件看起来像这样:

I'm trying to call a function that is coded in ARM NEON assembly in an .s file that looks like this:

AREA myfunction, code, readonly, ARM global fun align 4 fun push {r4, r5, r6, r7, lr} add r7, sp, #12 push {r8, r10, r11} sub r4, sp, #64 bic r4, r4, #15 mov sp, r4 vst1.64 {d8, d9, d10, d11}, [r4]! vst1.64 {d12, d13, d14, d15}, [r4] [....]

和我组装这样的:

armasm.exe -32 func.s func.obj

不幸的是,这并不工作,我得到非法指令异常当我尝试并调用该函数。当我用DUMPBIN.EXE拆卸OBJ,它似乎被拆卸,仿佛这是拇指code,尽管装配的ARM指令(见上code)。

Unfortunately this doesn't work, and I'm getting illegal instruction exception when I try and call the function. When I used dumpbin.exe to disassemble the .obj, it seem to be disassembling as though it was Thumb code, despite the ARM directive in the assembly (see code above).

我怀疑该功能被称为在Thumb模式下,所有的功能都假设默认情况下在Windows上是在Thumb模式。无法看到上找到这虽然任何信息。

I suspect the function is being called in Thumb mode, and that all functions are assumed to be in Thumb mode by default on Windows. Can't see to find any info on this though.

有谁知道是怎么回事呢?

Does anyone know what is going on here?

编辑:这发生在微软Surface以及

This happens on Microsoft Surface as well

推荐答案

您可以用Thumb模式BX指令开始汇编code和简单地转移到同一个源文件中的ARM一部分。

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.

和你不必在最后切换回Thumb模式,因为你将在BX或POP {PC}完成ARM函数反正它会自动的切换。

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.

我的回答是WAAAAAAY晚了,但我如果它工作在WP真的很好奇。 (我没有任何)

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

更多推荐

在Windows Phone 8的ARM NEON装配不工作

本文发布于:2023-06-11 00:11:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/621986.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作   Phone   Windows   NEON   ARM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!