Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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

Unfortunately this ABI didn't specify how __int128 (and other nonstandard types) are to be passed.



The 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/x..., and it does actually explain how to pass __int128.


WebAssembly also has a de-facto standard ABI: https://github.com/WebAssembly/tool-conventions/blob/main/Ba...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: