IUB
Introduction
History
Architecture
Implications
32-bits
Software
Conclusion
Main
 
       

 

“Hardware is nothing without software”, meaning what will the proud owner of a brand new 64-bit processor do with it? Obviously, run some software on it. The availability of 64-bit software is described in more detail in chapter software. However, there is a significant applications which are 32-bit. Therefore, the backwards compatibility, i.e. ability of the processor to run the industry-standard 32-bit code (our present applications), should be considered, especially in the early stages of 64-bit processors trying to take over the hegemony of 32-bit ones in mainsteram markets. Here, the two competitors for broad, mainstream market - AMD and Intel, have taken different approaches.

AMD and X86-64

AMD has basically extended the 32-bit X86 architecture with 64-bit instructions. It has to be mentioned that the X86 architecture comes from Intel’s 386, which was to be backwards compatible with 16-bit code ages ago. The new extended AMD’s architecture is called X86-64 and its 64-bit operation was described in chapter architecture. Now its backwards compatibility will be considered. In the words of (AMD Manual , page 1), "It is the architectural basis on which new processors can provide seamless, high-performance support for both the vast body of existing software and new 64-bit software required for higher-performance applications."
A 64-bit AMD processor (like Hammer) can run in different modes. They are listed in the following table
(source: AMD Manual, page 3):

Long mode

Long mode is an extension of the legacy mode. It does not support legacy real mode, legacy virtual-8086 mode and hardware task switching. It consists of two submodes: 64-bit mode and compatibility mode.
64-bit mode
The 64-bit mode was described in detail in previous chapter. It supports all new features and extensions of X86-64, but requires a new 64-bit operating system. Existing applications need to be recompiled in order to run in this mode.
Compatibility mode
The second submode of long mode - the compatibility mode requires a 64-bit operating systems as well, but allows it to run existing 32-bit and 16-bit applications (code) without actually recompiling them. Applications use 16-bit or 32-bit addressing and can access the first 4 GB of virtual memory. Legacy X86 instruction prefixes are used to switch between 32-bit and 16-bit addresses and operands. The compatibility submode is enabled by operating system based on individual code-segment. The X86 segmentation works the same way as in legacy X86 architecture - with the use of 16-bit and 32-bit protected-mode semantics. For applications, this submode looks like legacy X86 protected environment, while the operating system uses 64-bit long mode mechanisms.

Legacy mode

The Legacy mode is compatible with existing 32-bit processor implementations using the X86 architecture. The x86-64 processors boot in legacy real mode, just like X86 architecture processors. The Legacy mode does not require a 64-bit operating system. It works with both 32-bit and 16-bit operating systems and preserves binary compatibility with both 32-bit and 16-bit applications. It consists of three submodes: Protected mode, Virtual-8086 mode and Real mode, which are described in (AMD Manual , page 9,10) as follows:
Protected mode
"Protected mode supports 16-bit and 32-bit programs with memory segmentation, optional paging, and privilege-checking. Programs running in protected mode can access up to 4GB of memory space."
Virtual-8086 mode
"Virtual-8086 mode supports 16-bit realmode programs running as tasks under protected mode. It uses a simple form of memory segmentation, optional paging, and limited protection-checking. Programs running in virtual-8086 mode can access up to 1MB of memory space."
Real mode
"Real mode supports 16-bit programs using simple register-based memory segmentation. It does not support paging or protection-checking. Programs running in real mode can access up to 1MB of memory space."


Intel, IA-64 and IA-32

To prevent confusion of the reader, it has to be mentioned that Intel's IA-32 stands for nothing else than just X86.
While AMD has decided to extend the existing X86 architecture, Intel has taken a completely different approach. They designed a new 64-bit IA-64 architecture. This new IA-64 is completely incompatible with the old IA-32 (X86). However, the Itanium processor still is backwards compatible and supports IA-32 instructions. The modes, in which Itanium can run are similar to AMD's operating modes. It is capable of both, running a mixture of IA-32 and IA-64 applications on top of an IA-64 (64-bit) operation system, as well as running IA-32 operating system with IA-32 applications. (tables from: Intel manual, p. 1:9 and 1:10):


The bad thing about this is that as mentioned earlier, the IA-64 instruction set is completely incompatible with IA-32. Although Itanium is capable of running IA-32 instructions, they are always passed on to "IA-32 Compatibility Execution Engine". First a simplified picture (source) is a shown, followed by a schematics from the Intel manual page 2-10).


Whenever an Itanium wants to execute an IA-32 instruction, it has to switch to the IA-32 mode. There are special instructions to go from the IA-64 mode to IA-32 and back, as it is shown in the figure (source) below:


JMPE (IA-32): jumps to a 64-bit instruction and changes to IA-64 mode;
br.ia (IA-64): moves to a 32-bit instruction and changes to IA-32 mode;
Interruptions transit to IA-64 mode, allowing the fulfillment of all interruption conditions and
rfi (IA-64): it is the return of the interruption; the return happens both to an IA-32 situation and to an IA-64, depending on the situation present at the moment when the interruption is invoked."


Unfortunately, the execution of IA-32 instructions is as slow as on a Pentium. The IA-32 part of the processor can be describe as "an entirely separate ... Pentium circuit on the same silicon" (source). Compared with AMD, the Intel 64-bit processor is really bad off with today's industry standard X86 (IA-32). AMD owners, on the other hand, can without problems use their processor for 32bit applications without a loss of speed, lay back and wait for the coming 64-bit applications.
That makes clear why Intel has licensed the X86-64 from AMD (source) and why there are appearing rumours that Intel is working on an X86-64 type processor, codenamed Yamhill.

 
previous
next