C++ arm64的上下文?
我正在尝试为iOS(armv7、armv7s、arm64)编译C++ arm64的上下文?,c++,xcode,assembly,boost,boost-context,C++,Xcode,Assembly,Boost,Boost Context,我正在尝试为iOS(armv7、armv7s、arm64)编译boost::context: 错误 jump_arm_aapcs_macho_gas.S:52:18: error: ',' expected stmia a1, {v1-v8,sp-lr} @ save V1-V8,SP-LR ^ jump_arm_aapcs_macho_gas.S:53:14: error: register expected str lr, [a1,#40]
boost::context
:
错误
jump_arm_aapcs_macho_gas.S:52:18: error: ',' expected
stmia a1, {v1-v8,sp-lr} @ save V1-V8,SP-LR
^
jump_arm_aapcs_macho_gas.S:53:14: error: register expected
str lr, [a1,#40] @ save LR as PC
^
jump_arm_aapcs_macho_gas.S:69:18: error: invalid variant 'use'
mov a1, a3 @ use third arg as return value after jump
^
jump_arm_aapcs_macho_gas.S:70:39: error: unexpected token at start of statement
@ and as first arg in context function
^
jump_arm_aapcs_macho_gas.S:71:18: error: ',' expected
ldmia a2, {v1-v8,sp-pc} @ restore v1-V8,SP-PC
^
跳臂跳气
.text
.globl _jump_fcontext
.align 2
_jump_fcontext:
stmia a1, {v1-v8,sp-lr} @ save V1-V8,SP-LR
str lr, [a1,#40] @ save LR as PC
#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
cmp a4, #0 @ test if fpu env should be preserved
beq 1f
mov a4, a1
add a4, #52
vstmia a4, {d8-d15} @ save S16-S31
mov a4, a2
add a4, #52
vldmia a4, {d8-d15} @ restore S16-S31
1:
#endif
mov a1, a3 @ use third arg as return value after jump
@ and as first arg in context function
ldmia a2, {v1-v8,sp-pc} @ restore v1-V8,SP-PC
如果我删除了arm64,并将架构设置为仅armv7,那么它会编译,因此代码应该很好
有没有办法让它为arm64编译?arm64(AArch64)与ARM32(A32)在指令和寄存器集上都有很大的不同。调用约定(ABI)也不同。您需要重写汇编程序片段。我建议您与开发人员联系,因为您似乎不熟悉自己动手的底层细节。谢谢!我习惯于看到asm只使用32位和64位的“e”或“r”前缀寄存器。。我有点希望事情会这么简单。我想我会去boost论坛。