X32 ABI: Difference between revisions
m commas |
ILP32 on SPARC has been, and still is, actually common. |
||
Line 47: | Line 47: | ||
==History== |
==History== |
||
Running a userspace that is comprised 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|Solaris operating system]] does so for both [[SPARC]] and x86-64, for example. On the [[Linux]] side, SPARC and PowerPC Linux distributions such as [[Aurora SPARC Linux]] and [[Debian]] also ship an ILP32 userspace. The underlying reason is the somewhat "more expensive" nature of LP64 code<ref>{{cite web|url=http://www.osnews.com/story/5768/Are_64-bit_Binaries_Really_Slower_than_32-bit_Binaries_|date=2004-01-22|accessdate=2014-03-25|author=Tony Bourke}}</ref>, just like it has been shown for x86-64. In that regard, x32 is just an extension of 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]]'s release in 2003, notably [[Donald Knuth]] in 2008.<ref>{{cite web |url=http://www-cs-faculty.stanford.edu/~uno/news08.html |title= Recent News: A Flame About 64-bit Pointers |author=Donald Knuth |date=February 2008 |accessdate=15 May 2012}}</ref> 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 x32-ABI.<ref>{{cite web |url=http://thread.gmane.org/gmane.linux.kernel/1184876 |title= RFD: x32 ABI system call numbers |author=H. Peter Anvin |date=27 August 2011 |accessdate=15 May 2012}}</ref> |
Several people had discussed the benefits of an x86-64 ABI with 32-bit pointers in the years since the [[Athlon 64]]'s release in 2003, notably [[Donald Knuth]] in 2008.<ref>{{cite web |url=http://www-cs-faculty.stanford.edu/~uno/news08.html |title= Recent News: A Flame About 64-bit Pointers |author=Donald Knuth |date=February 2008 |accessdate=15 May 2012}}</ref> 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 x32-ABI.<ref>{{cite web |url=http://thread.gmane.org/gmane.linux.kernel/1184876 |title= RFD: x32 ABI system call numbers |author=H. Peter Anvin |date=27 August 2011 |accessdate=15 May 2012}}</ref> |
||
Revision as of 15:33, 25 March 2014
x32 ABI (x32 application binary interface) is an application binary interface project for Linux that allows programs to take advantage of the benefits of x86-64 (larger number of CPU registers, better floating-point performance, faster position-independent code shared libraries, function parameters passed via registers, faster syscall instruction) while using 32-bit pointers and thus avoiding the overhead of 64-bit pointers.[1][2][3]
Details
Though the x32 ABI limits the program to a virtual address space of 4 GB, it also decreases the memory footprint of the program, and in some cases, can allow it to run faster.[1][2][3] 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.[3][4] 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.[5]
Feature | i386 | x32 | x86-64 |
---|---|---|---|
Max. memory per process | 4 GiB | 128 TiB | |
Integer registers | 6 (PIC) | 16 | |
FP registers | 8 | 16 | |
Pointers | 4 bytes | 8 bytes | |
64-bit arithmetic | No | Yes | |
Floating point | x87 | SSE | |
Calling convention | Memory | Registers | |
PIC prologue | 2-3 insn | None |
History
Running a userspace that is comprised 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, for example. On the Linux side, SPARC and PowerPC Linux distributions such as Aurora SPARC Linux and Debian also ship an ILP32 userspace. The underlying reason is the somewhat "more expensive" nature of LP64 code[6], just like it has been shown for x86-64. In that regard, x32 is just an extension of 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's release in 2003, notably Donald Knuth in 2008.[7] 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 x32-ABI.[8]
That same day, Linus Torvalds replied with a concern that the use of 32-bit time values in the x32 ABI could cause problems in the future.[9][10] This is because the use of 32-bit time values would cause the time values to overflow in the year 2038.[9][10] Following this request, the developers of the x32 ABI changed the time values to 64-bit.[11]
A presentation at the Linux Plumbers Conference on September 7, 2011, covered the x32 ABI.[2]
The x32 ABI was merged into the Linux kernel for the 3.4 release with support being added to the GNU C Library in version 2.16.
References
- ^ a b Thorsten Leemhuis (2011-09-13). "Kernel Log: x32 ABI gets around 64-bit drawbacks". www.h-online.com. Archived from the original on 28 October 2011. Retrieved 2011-11-01.
- ^ a b c "x32 - a native 32-bit ABI for x86-64". linuxplumbersconf.org. Retrieved 2012-06-12.
- ^ a b c "x32-abi". Google Sites. Retrieved 2011-11-01.
- ^ "181.mcf SPEC CPU2000 Benchmark Description File". Standard Performance Evaluation Corporation. 1999-10-14. Retrieved 2011-11-01.
- ^ H.J. Lu, H Peter Anvin, Milind Girkar (September 2011). "X32 - A Native 32bit ABI For X86-64".
{{cite news}}
: CS1 maint: multiple names: authors list (link) - ^ Tony Bourke (2004-01-22). http://www.osnews.com/story/5768/Are_64-bit_Binaries_Really_Slower_than_32-bit_Binaries_. Retrieved 2014-03-25.
{{cite web}}
: Missing or empty|title=
(help) - ^ Donald Knuth (February 2008). "Recent News: A Flame About 64-bit Pointers". Retrieved 15 May 2012.
- ^ H. Peter Anvin (27 August 2011). "RFD: x32 ABI system call numbers". Retrieved 15 May 2012.
- ^ a b Jonathan Corbet (2011-08-29). "The x32 system call ABI". LWN.net. Retrieved 2011-11-01.
- ^ a b Linus Torvalds (2011-08-26). "Re: RFD: x32 ABI system call numbers". LWN.net. Retrieved 2011-11-01.
- ^ H.J. Lu (2011-11-24). "X32 project status update".