I have write some test code, just for testing the stack overflow.
int MyFunc(long c)
{
char buffer[12];
return sprintf(buffer, "xxxxxxxxxxx%ld", c);
}
when I compile it to ARM64 assembly, I got the result
MyFunc(long): // @MyFunc(long)
sub sp, sp, #32 // =32
stp x29, x30, [sp, #16] // 16-byte Folded Spill
add x29, sp, #16 // =16
adrp x1, .L.str
mov x2, x0
add x1, x1, :lo12:.L.str
add x0, sp, #4 // =4
bl sprintf
ldp x29, x30, [sp, #16] // 16-byte Folded Reload
add sp, sp, #32 // =32
ret
so, what does 16-byte Folded Spill mean? and why?