|
|
|
|
|
by saagarjha
2918 days ago
|
|
> By convention, the stack is between the value of registers rbp (lower address) and rsp (higher address) and rsp increases when there are more stack frames added. We're on 64-bit Linux so each frame takes up 8 bytes. Stack frames grow in size based on local variables allocated on the stack. And $rbp and $rsp need not point at the correct places in the stack for leaf functions, at least on Linux, because it uses the System V ABI. |
|
In general, is there some "don't do anything funky" compiler flag so it sticks to a simpler internal model?
[1] https://wiki.osdev.org/Calling_Conventions