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

前端 未结 10 2186
野趣味
野趣味 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:38

    While I cannot really answer your question of WHY, you may find the manuals at the following site useful:

    http://www.agner.org/optimize/

    Regarding the ABI, have a look especially at:

    http://www.agner.org/optimize/calling_conventions.pdf

    Hope that's useful.

提交回复
热议问题