2 ms·
There is a specified common C++ ABI that gcc, clang, Intel's proprietary compiler, and others use. It was originally developed for the Itanium processor but is
by not2b 2y ago
There is a specified common C++ ABI that gcc, clang, Intel's proprietary compiler, and others use. It was originally developed for the Itanium processor but is now used by gcc and clang for everything. See
https://itanium-cxx-abi.github.io/cxx-abi/abi.html https://itanium-cxx-abi.github.io/cxx-abi/abi.html
Unfortunately this ABI didn't specify how __int128 (and other nonstandard types) are to be passed.
- jcranmer 2y agoThe Itanium ABI effectively specifies how to lower the C++ ABI to an assumed C ABI, and the C ABI is given by what is known as the "psABI" (processor-specific ABI). The (not-most-recent) x86-64 ABI is here: https://raw.githubusercontent.com/wiki/hjl-tools/x86-psABI/x86-64-psABI-1.0.pdf https://raw.githubusercontent.com/wiki/hjl-tools/x86-psABI/x..., and it does actually explain how to pass __int128.
- kevingadd 2y agoWebAssembly also has a de-facto standard ABI: https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md#function-signatures https://github.com/WebAssembly/tool-conventions/blob/main/Ba...