HOME

TheInfoList



OR:

The x32 ABI is an
application binary interface An application binary interface (ABI) is an interface exposed by software that is defined for in-process machine code access. Often, the exposing software is a library, and the consumer is a program. An ABI is at a relatively low-level of a ...
(ABI) and one of the
interfaces of the Linux kernel Interface or interfacing may refer to: Academic journals * ''Interface'' (journal), by the Electrochemical Society * '' Interface, Journal of Applied Linguistics'', now merged with ''ITL International Journal of Applied Linguistics'' * '' Inter ...
. The x32 ABI provides 32-bit integers, long and pointers ( ILP32) on Intel and AMD 64-bit hardware. The ABI allows programs to take advantage of the benefits of
x86-64 x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
instruction set (larger number of
CPU register A processor register is a quickly accessible location available to a computer's processor. Registers usually consist of a small amount of fast storage, although some registers have specific hardware functions, and may be read-only or write-onl ...
s, better floating-point performance, faster
position-independent code In computing, position-independent code (PIC) or position-independent executable (PIE) is a body of machine code that executes properly regardless of its memory address. PIC is commonly used for shared libraries, so that the same library code c ...
,
shared libraries In computing, a library is a collection of resources that can be leveraged during software development to implement a computer program. Commonly, a library consists of executable code such as compiled functions and classes, or a library can ...
, function parameters passed via registers, faster syscall instruction) while using 32-bit
pointers Pointer may refer to: People with the name * Pointer (surname), a surname (including a list of people with the name) * Pointer Williams (born 1974), American former basketball player Arts, entertainment, and media * ''Pointer'' (journal), the ...
and thus avoiding the overhead of 64-bit pointers.


Details

Though the x32 ABI limits the program to a
virtual address space In computing, a virtual address space (VAS) or address space is the set of ranges of virtual addresses that an operating system makes available to a process. The range of virtual addresses usually starts at a low address and can extend to the h ...
of 4 GiB, it also decreases the
memory footprint Memory footprint refers to the amount of main memory that a program uses or references while running. The word footprint generally refers to the extent of physical dimensions that an object occupies, giving a sense of its size. In computing, t ...
of the program by making pointers smaller. This can allow it to run faster by fitting more code ''and'' more data into
cache Cache, caching, or caché may refer to: Science and technology * Cache (computing), a technique used in computer storage for easier data access * Cache (biology) or hoarding, a food storing behavior of animals * Cache (archaeology), artifacts p ...
. The best results during testing were with the 181.mcf SPEC CPU 2000 benchmark, in which the x32 ABI version was 40% faster than the x86-64 version. On average, x32 is 5–8% faster on the SPEC CPU integer benchmarks compared to x86-64. There is no speed advantage over x86-64 in the SPEC CPU floating-point benchmarks. There are also some application benchmarks that demonstrate the advantages of the x32 ABI.


History

Running a userspace that consists mostly of programs compiled in ILP32 mode and which also have principal access to 64-bit CPU instructions has not been uncommon, especially in the field of "classic RISC" chips. For example, the Solaris operating system does so for both SPARC and x86-64. On the
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
side,
Debian Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
also ships an ILP32 userspace. The underlying reason is the somewhat "more expensive" nature of LP64 code, just like it has been shown for x86-64. In that regard, the x32 ABI extends the ILP32-on-64bit concept to the x86-64 platform. Several people had discussed the benefits of an x86-64 ABI with 32-bit pointers in the years since the
Athlon 64 The Athlon 64 is a ninth-generation, AMD64-architecture microprocessor produced by Advanced Micro Devices (AMD), released on September 23, 2003. It is the third processor to bear the name ''Athlon'', and the immediate successor to the Athlon XP. ...
's release in 2003, notably
Donald Knuth Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist and mathematician. He is a professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of comp ...
in 2008. There was little publicly visible progress towards implementing such a mode until August 27, 2011, when Hans Peter Anvin announced to the Linux kernel mailing list that he and H. J. Lu had been working on the x32 ABI. That same day,
Linus Torvalds Linus Benedict Torvalds ( , ; born 28 December 1969) is a Finnish software engineer who is the creator and lead developer of the Linux kernel. He also created the distributed version control system Git. He was honored, along with Shinya Yam ...
replied with a concern that the use of 32-bit time values in the x32 ABI could cause problems in the future. This is because the use of 32-bit time values would cause the time values to overflow in the year 2038. Following this request, the developers of the x32 ABI changed the time values to 64-bit. A presentation at the Linux Plumbers Conference on September 7, 2011, covered the x32 ABI. The x32 ABI was merged into the Linux kernel for the 3.4 release with support being added to the
GNU C Library The GNU C Library, commonly known as glibc, is the GNU Project implementation of the C standard library. It provides a wrapper around the system calls of the Linux kernel and other kernels for application use. Despite its name, it now also dir ...
in version 2.16. In December 2018 there was discussion as to whether to deprecate the x32 ABI, which has not happened as of April 2023, and has seen some new development in May 2024.


Adoption


References


External links


x32 ABI Development Website

x32 ABI Presentation Slides from the Linux Plumbers Conference
{{Linux kernel Interfaces of the Linux kernel X86 architecture