Re:Garbage Collectors Are Scary
by qweqwe14 on Sunday May 12, 2024 @10:30AM
(#40334765)
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
[ Parent
| on HN ]
Re:Garbage Collectors Are Scary
by professoretc on Sunday May 12, 2024 @03:09PM
(#40336712)
The 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.