Bookmark and Share

Articles: CPU

Pages: [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 ]

Anyway, we are not trying to seem genius fortune-tellers here, as the processor developers have been aware of this fact for ages already. And they have also been aware of the possible solutions to this matter. Say, the same Pentium 4 really has eight 32bit general purpose registers. However, these are the registers seen by the execution code. And beyond that, there are 120 (!) other registers hidden inside the CPU, so that any of them can be represented as one of the basic eight any time. Hm, this is an interesting turn, but not an evident one, especially for the compiler. But as we remember, Pentium 4 doesn’t depend on the compiler that much.

AMD chose another solution, which is more evident for the compiler. They simply doubled the number of visible registers, so that in 64bit mode K8 features 16 64bit general purpose registers. The floating-point registers remained unchanged: there are 8 of them, because x86 is not the No.1 during floating-point calculations. AMD pins most of its hope on SIMD instructions in this case, that is why they also doubled the number of SIMD registers: there are 16 of them now.

Then everything depends only on the processor working mode. There is a reverse compatibility mode, when K8 works like a regular 32bit CPU and doesn’t use any of its new features besides those simply improving the CPU performance. There is the so-called “long mode”, which in its turn consists of two sub-modes: “64bit mode” and “compatibility mode”. Of course, 64bit OS will be needed, though it can perform both code types: the 64bit one as well as the regular x86. In the latter case the program will certainly have no access to the memory beyond 4GB, the complete registers set, additional registers, etc. All in all, Windows 95 used to do the same thing to 16bit applications.

However, the registers are all set to 32bit mode by default, because even a 64bit program doesn’t use only 64bit numbers. It is even more likely to use the good old 32bit. Therefore, assigned 64bit registers for 32bit numbers is a waste of resources, that is why the default setting is 32bit. If the program needs to work with 64bit registers, it has to use a special 1-Byte long prefix when addressing them. It is quite a lot, especially if there are many requests like that. Although AMD assumes that the code can grow maximum 10% bigger, when they shift from x86 to 64bit.

Pages: [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 ]

Discussion

Comments currently: 28
Discussion started: 07/08/03 06:13:52 AM
Latest comment: 08/25/06 09:00:31 AM

View comments

You must log in to add comments.

Forgot password? Registration

remember me