x32 (ABI)
x32 is a binary interface (ABI) of the Linux kernel from version 3.4, which is based on the AMD64 architecture, but uses 32 bit wide pointers. This makes it possible to use the extensions of the AMD64 architecture, such as the IP -relative addressing mode for efficient PIC , but at the same time the memory consumption is lower due to the shorter pointers. In addition, the data type is long
32 bits, so the data model is - as in 32-bit mode - ILP32 . Therefore, programs that need to differentiate between 32-bit, 64-bit and x32 mode can recognize the x32 mode as follows:
#if defined( __x86_64__ ) && defined( __ILP32__ )
… // x32-spezifischer Code
#endif
The x32 ABI uses the same system calls as the x64 ABI. A different number is used for system calls where the pointer length makes a difference.
feature | Architecture / ABI | ||
---|---|---|---|
i386 | x32 process | x86_64 | |
Maximum amount of physical memory | 64 GiB with PAE | 128 TiB | |
Maximum addressable main memory per process | 4 GiB | 128 TiB | |
Number of integer registers | 6 (PIC) | 16 | |
Number of floating point registers | 8th | 16 | |
Size of pointer data types | 32 bit | 64 bit | |
Calculating with 64-bit registers | No | Yes | |
Floating point numbers | x87 | SSE | |
Calling convention | random access memory | register | |
PIC prolog | 2-3 insn | None |
Web links
- X32 System V Application Binary Interface (project page)
- x32 - a native 32-bit ABI for x86-64 (talk at the Linux Plumbers conference )