4 ms·
Eh? If the MacOS ABI says your stack alignment must be 16 bytes, then it must be 16 bytes. It's not any different than other platforms mandating a particular st
by jey 17y ago
Eh? If the MacOS ABI says your stack alignment must be 16 bytes, then it must be 16 bytes. It's not any different than other platforms mandating a particular stack alignment, except that stack alignment on x86 is "usually" 4 bytes. Either way, some alignment is dictated by the platform's ABI, so the MacOS 16-byte stack alignment really shouldn't be that surprising. Sure, it's a bit different than "most" x86 ABIs, but so what?
I agree that the ABI could use the convention that the callee sets ESP to have whatever alignment it wants, if needed for its SSE ops or whatever. But really, why care? Sure, it'd be interesting to hear the rationale... but in the end, we just have to follow the ABI, and mandating 16-byte stack alignment isn't all that crazy.
- barrkel 17y agoIt's "so what" because it hurts the portability of other software to the platform. It's a bad business decision because it increases the costs of third parties supporting the platform.