ios - iOS 上编译成功但执行汇编 MRC 指令失败?

标签 ios assembly arm

我尝试在 iOS (iPad/iPhone) 代码中检查 ARM 架构 ID,例如

"mrc p15,0,r1,c0,c0,0"

指令通过编译但无法执行,Xcode显示“EXC_BAD_INSTRUCTION”。 有什么建议吗?

最佳答案

来自 ARMv7 架构引用手册:

MRC

Move to ARM core register from Coprocessor causes a coprocessor to transfer a value to an ARM core register or to the condition flags. If no coprocessor can execute the instruction, an Undefined Instruction exception is generated.

显然,只是没有从哪里读取值。

关于ios - iOS 上编译成功但执行汇编 MRC 指令失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8487582/

相关文章:

ios - XCode 9.0 "Jump to definition"上下文菜单经常挂起

assembly - 8086 - 将命令行参数存储在数组中

c - UNS_32 在哪里定义的?

arm - 可以使用 Visual Studio 2012 构建 ARM 桌面程序吗?

assembly - ARM:2 个 printfs 导致段错误

ios - iPad Retina 启动图像——仅显示图像的上半部分

iphone - View 透明度和手势处理

ios - 多行中行与行之间的核心文本空间

math - 有没有人试图打破更小一点?

assembly - 检测IP之前的调用指令