gpt4 book ai didi

c++ - boost::arm64 的上下文?

转载 作者:行者123 更新时间:2023-11-30 04:03:46 28 4
gpt4 key购买 nike

我正在尝试为 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] @ 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
^

jump_arm_aapcs_macho_gas.S

.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) 也不同。您需要重写汇编程序片段。我建议您联系开发人员,因为您似乎不熟悉自己完成的底层细节。

关于c++ - boost::arm64 的上下文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24196398/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com