通过linux x86-64函数调用可以保留哪些寄存器 [英] What registers are preserved through a linux x86-64 function call
本文介绍了通过linux x86-64函数调用可以保留哪些寄存器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我相信我了解linux x86-64 ABI如何使用寄存器和堆栈将参数传递给函数(请参阅
I believe I understand how the linux x86-64 ABI uses registers and stack to pass parameters to a function (cf. previous ABI discussion). What I'm confused about is if/what registers are expected to be preserved across a function call. That is, what registers are guarenteed not to get clobbered?
推荐答案
r12
,r13
,r14
,r15
,rbx
,rsp
,rbp
是被调用方保存的寄存器-它们在跨函数调用保留"中具有是" 列.
r12
, r13
, r14
, r15
, rbx
, rsp
, rbp
are the callee-saved registers - they have a "Yes" in the "Preserved across function calls" column.
这篇关于通过linux x86-64函数调用可以保留哪些寄存器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文