authorgravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-06-02 23:28:11+07:00
committergravatar for koachan@protonmail.comKoakuma <koachan@protonmail.com> 2022-06-06 20:34:53+07:00
logc00d493a0001cbc9ebc0c02197ae70d921242b22
treea2065632e97b8030f017ba106a033a9fe5b2165a
parent5d61f32887c553415215ceadf44cba1bebc7b9da

stage2: sparc64: Add some notes about stack space allocation


1 files changed, 5 insertions(+), 0 deletions(-)

src/arch/sparc64/abi.zig+5
...@@ -13,6 +13,11 @@ pub const stack_bias = 2047;...@@ -13,6 +13,11 @@ pub const stack_bias = 2047;
13// The first 128 bytes of the stack is reserved for register saving purposes.13// The first 128 bytes of the stack is reserved for register saving purposes.
14// The ABI also requires to reserve space in the stack for the first six14// The ABI also requires to reserve space in the stack for the first six
15// outgoing arguments, even though they are usually passed in registers.15// outgoing arguments, even though they are usually passed in registers.
16// TODO Don't allocate the argument space in leaf functions
17// TODO Save an RO copy of outgoing arguments in reserved area when building in Debug
18// TODO Should we also save it in ReleaseSafe? Solaris and OpenBSD binaries seem to ship
19// with argument copying enabled and it doesn't seem to give them big slowdowns so
20// I guess it would be okay to do in ReleaseSafe?
16pub const stack_reserved_area = 128 + 48;21pub const stack_reserved_area = 128 + 48;
1722
18// There are no callee-preserved registers since the windowing23// There are no callee-preserved registers since the windowing