3 ms·
AFAIK you should only need 16-byte stack alignment if you use vector instructions, so Linux/x86-64 doesn't mandate it in all cases
by qweqwe14 2y ago
AFAIK you should only need 16-byte stack alignment if you use vector instructions, so Linux/x86-64 doesn't mandate it in all cases
- professoretc 2y agoThe problem is that if you call another function, you won't know whether that function is uses any instructions that require alignment. So in practice, only leaf functions can skip stack alignment. The ABI states that the stack pointer must be aligned to a multiple of 16, plus 8, before any `call` instruction.