x86-64 Machine-Level Programming | Search for a title, author or keyword | ||||||||
x86-64 Machine-Level Programming PDF document, by Randal E. Bryant and David R. O’Hallaron, September 9, 2005. Intel’s IA32 instruction set architecture ( ISA ), colloquially known as “x86”, is the dominant instruction format for the world’s computers. IA32 is the platform of choice for most Windows and Linux machines. The ISA we use today was defined in 1985 with the introduction of the i386 microprocessor, extending the 16-bit instruction set defined by the original 8086 to 32 bits. Even though subsequent processor generations have introduced new instruction types and formats, many compilers, including GCC, have avoided using these features in the interest of maintaining backward compatibility. A shift is underway to a 64-bit version of the Intel instruction set. Originally developed by Advanced Micro Devices ( AMD ) and named x86-64, it is now supported by high end processors from AMD ( who now call it AMD64 ) and by Intel, who refer to it as EM64T. Most people still refer to it as “x86-64,” and we follow this convention. The combination of new hardware and revised compiler makes x86-64 code substantially different in form and in performance than IA32 code. This document serves as a supplement to Chapter 3 of Computer Systems: A Programmer’s Perspective ( CS:APP ), describing some of the differences. We start with a brief history of how AMD and Intel arrived at x86-64, followed by a summary of the main features that distinguish x86-64 code from IA32 code, and then work our way through the individual features. The 32-bit word size of the IA32 has become a major limitation in growing the capacity of microprocessors. Most significantly, the word size of a machine defines the range of virtual addresses that programs can use, giving a 4-gigabyte virtual address space in the case of 32 bits. It is now feasible to buy more than this amount of RAM for a machine, but the system cannot make effective use of it. For applications that involve manipulating large data sets, such as scientific computing, databases, and data mining, the 32-bit word size makes life difficult for programmers. They must write code using out-of-core algorithms, where the data reside on disk and are explicitly read into memory for processing. Intel’s first foray into 64-bit computers were the Itanium processors, based on the IA64 instruction set. Unlike Intel’s historic strategy of maintaining backward compatibility as it introduced each new generation of microprocessor, IA64 is based on a radically new approach jointly developed with Hewlett-Packard. Its Very Large Instruction Word ( VLIW ) format packs multiple instructions into bundles, allowing higher degrees of parallel execution. Implementing IA64 proved to be very difficult, and so the first Itanium chips did not appear until 2001, and these did not achieve the expected level of performance on real applications. Although the performance of Itanium-based systems has improved, they have not captured a significant share of the computer market. Itanium machines can execute IA32 code in a compatibility mode but not with very good performance. Meanwhile, Intel’s archrival, Advanced Micro Devices ( AMD ) saw an opportunity to exploit Intel’s misstep with IA64. In 2002, AMD introduced a 64-bit microprocessor based on its “x86-64” instruction set. As the name implies, x86-64 is an evolution of the Intel instruction set to 64 bits. It maintains full backward compatibility with IA32, but it adds new data formats, as well as other features that enable higher capacity and higher performance. AMD’s recent generations of Opteron and Athlon 64 processors have indeed proved very successful as high performance machines. Intel realized that its strategy of a complete shift from IA32 to IA64 was not working, and so began supporting their own variant of x86-64 in 2004 with processors in the Pentium 4 Xeon line. Since they had already used the name “IA64” to refer to Itanium, they then faced a difficulty in finding their own name for this 64-bit extension. In the end, they decided to describe x86-64 as an enhancement to IA32, and so they refer to it as IA32-EM64T for “Enhanced Memory 64-bit Technology”.
|
|||||||||
x86-64 Machine-Level Programming | Disclaimer: this link points to content provided by other sites. |