[plug] AMD64 Debian Box3N :D

Cameron Patrick cameron at patrick.wattle.id.au
Fri May 5 17:40:38 WST 2006


Jonathan Young wrote:

> I went to a couple of AMD conferences this year and unless I have my
> wires crossed, the distinct impression that I got was that your 32-bit
> OS sees a 32-bit CPU + 1-bit available for DEP (extremely simplified
> explanation!).

That explanation is a bit rubbish.  What you are seeing is a whole bunch
independent design decisions: larger address space, 64-bit registers,
more registers, better floating point, and execute-prevention bit.  The
first three are all tied together in the "AMD64" instruction set.  The
latter happened to be implemented first on AMD and Intel's 64-bit
processors, but is also found on some 32-bit Pentiums.  The "bit"
referred to in "X-bit processor" is also somewhat different to the "DEP
bit".

The "DEP" (execute-prevention) bit is taking advantage of one bit inside
_one_ particular data structure used to set up the CPU's memory
management tables which was previously marked "reserved".  The
32-vs-64-bit issue refers to the size of the machine registers and
available address space (much more than the 4GB addressable per-process
on standard i386 machines, but _not_ all of the 64 bits of an address is
actually usable, and the amount of physical memory addressable by
current AMD64 hardware is much less again).  The performance advantage
that most applications get from the new AMD64 instruction set, though,
is not from the increased address space (which actually slows things
down and increases memory usage for most applications) or larger
registers (very few applications use 64-bit arithmetic), but from the
increased _number_ of registers (twice as many as a standard i386).

Having more registers means that AMD64 processors (including ones
manufactured by Intel :-P) can spend less time shuffling data in and out
of memory and more time actually operating on that data.  At least we
are seeing mass-produced machines catch up with 1980s and 1990s RISC
systems!

Another advantage of AMD64s is that the archaic i386 floating-point
design (in which software pretends to be talking to an off-chip 387
co-processor, even though it's been on the same chip as the CPU since
the 486DX) has gone away, replaced by SSE2 (and later SSE3).  While some
software compiled for i386 took advantage of SSE2, _all_ floating-point
operations on AMD64 use it.  (Most compilers don't take advantage of its
vector-processing operations, though, so the speed up you get won't be
as great as when you compare it to hand-written SSE code, but it's still
an improvement.)

Cameron.




More information about the plug mailing list