0 votes
in General Knowledge by (744k points)
What are leaf functions? What registers can they use?

1 Answer

0 votes
by (744k points)
Best answer
Leaf functions make no calls to any other function.

They can freely use rdi, rsi, rdc, rcx, r8, and r9 even if less than 6 params were passed. Also can use r10 and 11 since theyre caller saved. rax can also be freely used as long as it has the return value before returning.
Welcome to the Answerine , a great place to find, read and share your favorite questions and answers.