为什么 x86-64 使用 IA-64 C++ ABI?

Why does x86-64 use IA-64 C++ ABI?

来自 the x86-64 psABI

9.1 C++

For the C++ ABI we will use the IA-64 C++ ABI and instantiate it appropriately. The current draft of that ABI is available at:

http://mentorembedded.github.io/cxx-abi/

为什么不设计自己的 ABI?

因为“Itanium”C++ ABI 被设计为通用的,或者至少是通用的。引用 the introduction:

In general, this document is written as a generic specification, to be usable by C++ implementations on a variety of architectures. However, it does contain processor-specific material for the Itanium 64-bit ABI, identified as such. Where structured data layout is described, we generally assume Itanium psABI member sizes. An implementation for a 32-bit ABI would typically just change the sizes of members as appropriate (i.e. pointers and long ints would become 32 bits), but sometimes an order change would be required for compactness, and we note more substantive changes.

短语“适当实例化”指的是调整安腾 psABI 假设以与 x86-64 psABI 一起使用所需的改编。