Why does the Mac ABI require 16-byte stack alignment for x86-32?

前端 未结 10 2191
野趣味
野趣味 2020-11-27 16:01

I can understand this requirement for the old PPC RISC systems and even for x86-64, but for the old tried-and-true x86? In this case, the stack needs to be aligned on 4 byte

10条回答
  •  孤城傲影
    2020-11-27 16:33

    Hmm, didn't OS X ABI also do funny RISC like things like passing small structs in registers?

    So that points to the consistency with other platforms theory.

    Come to think of it, the FreeBSD syscall api also aligns 64-bit values. (like e.g. lseek and mmap)

提交回复
热议问题