[go-nuts] Re: Why there are eight bytes pad in the stack frame of main function?

2022-12-21 Thread tarorual
Q2: I agree with the statement "4 are from rounding argsize up to 8 bytes". According to the Go internal ABI specification (although it is published for Go1.17 and later version, I think it has some

[go-nuts] Re: Why there are eight bytes pad in the stack frame of main function?

2022-12-19 Thread 'Keith Randall' via golang-nuts
Q1: stack frames are rounded to a multiple of 8 bytes, to keep the stack pointer 8-byte aligned. Part of that is rounding argsize to 8 bytes. (It's not strictly necessary, and we could report 4, I think, if there are no return values.) Q2: I think 4 are from rounding argsize up to 8 bytes, and