ARM to C 调用约定,NEON 寄存器保存 [英] ARM to C calling convention, NEON registers to save
本文介绍了ARM to C 调用约定,NEON 寄存器保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个类似的帖子,涵盖了常规寄存器.NEON寄存器怎么样.据我所知,必须跨函数调用保留寄存器的上半部分或下半部分.我在任何地方都找不到该信息,有人可以澄清一下吗?
There is a similar post that covers regular registers. What about NEON registers. As far as I remember either top half or bottom half of registers have to be preserved across function calls. I can't find that info anywhere, can somebody clarify that?
谢谢
- r0-r3 是参数和暂存寄存器;r0-r1 也是结果寄存器
- r4-r8 是被调用者保存寄存器
- r9 可能是一个被调用者保存寄存器(在 AAPCS 的某些变体上它是一个特殊寄存器)
- r10-r11 是被调用者保存寄存器
- r12-r15 是特殊寄存器
- r0-r3 are the argument and scratch registers; r0-r1 are also the result registers
- r4-r8 are callee-save registers
- r9 might be a callee-save register or not (on some variants of AAPCS it is a special register)
- r10-r11 are callee-save registers
- r12-r15 are special registers
来自 AAPCS,§5.1.2.1 VFP 寄存器使用约定(VFP v2、v3 和高级 SIMD 扩展):
- s16–s31 (d8–d15, q4–q7) 必须保留
- s0–s15 (d0–d7, q0–q3) 和 d16–d31 (q8–q15) 不需要保留
- s16–s31 (d8–d15, q4–q7) must be preserved
- s0–s15 (d0–d7, q0–q3) and d16–d31 (q8–q15) do not need to be preserved
推荐答案
来自 AAPCS,§5.1.2.1:
- s16–s31 (d8–d15, q4–q7) 必须保留
- s0–s15 (d0–d7, q0–q3) 和 d16–d31 (q8–q15) 不需要保留
- s16–s31 (d8–d15, q4–q7) must be preserved
- s0–s15 (d0–d7, q0–q3) and d16–d31 (q8–q15) do not need to be preserved
这篇关于ARM to C 调用约定,NEON 寄存器保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文