3
votes

I was reading a book on computer architecture to improve my understanding on microprocessors when I reached a stumbling block that the author didn't bother to explain. The book is concerned with intel processors from the original Pentium upwards.

The author never explained what x86 actually meant from processor to processor. I'm finding it difficult to understand because during a discussion on the original Pentium, the author said that one of the drawbacks of the Pentium is the that it assigned more than 30% of its transistors for x86 legacy support. So, I thought that he meant that the Pentium has to be compatible with programs written for older generation of processors like the 80386. Later, in another chapter on Pentium 4, he said he said 10% of the transistors were used for x86 support. What I didn't understand is which x86 is he talking about. Also, I'm certain that intel wasn't implementing different instruction sets for each new processor it released. If anything, new instructions will be added for new execution unit. What I'm trying to say is that if that is the case then x86 instructions are already a subset of the new instruction set. Or is that not so ?

I think I'm pretty confused. It would be helpful for someone to explain this x86 support thing and why would anyone want to run legacy software after, say, 10 years ? Also, are there different labels for different x86 implementations ? Because when they say x86 legacy support, do they mean x86 for in 80386 or maybe in 8086 ? Your reply will be cherished. Thanks

3
"why would anyone want to run legacy software after, say, 10 years ?" Because they used it back when it was new, they liked it, it was never released for newer platforms, and they want to keep using it?Michael
There's two aspects to this: the weird instructions nobody uses (like aaa) can be implemented in microcode, which takes die space but doesn't make the CPU slower when it's running code that doesn't use those instructions. x86 legacy baggage is more than just old instructions, though. More important is the hard-to-decode variable-length machine code encoding of all instructions, and some of the weird semantics of common instructions. (e.g. partial flags from inc and others requires the CPU to rename different parts of EFLAGS separately).Peter Cordes

3 Answers

4
votes

why would anyone want to run legacy software after, say, 10 years ?

Because they run software that was written 10 years ago. Or more, businesses routinely rely heavily on software that's older than 20 years or more. Software is very, very expensive, it requires a well-compensated programmer. Pretty hard to amortize the development cost if you can't sell hundreds of licenses, that never happens for LOB software. Very different for hardware, once you've got the (very expensive) masks and chip factory, you can create millions of chips at a very low cost.

Keeping new processor designs compatible with old ones is a very large reason why you have an Intel or AMD processor in your machine. Any attempt Intel made to break away from it has been an abysmal failure. iAPX 432, 80960 and Itanium are good examples.

3
votes

While the x86 ISA is a CISC ISA, since the Pentium, Intel processors internally use RISC-like micro-operations. x86 instructions are decoded into internal micro-operations.

So, it was estimated that the Pentium used 30% of its transistors to support the x86 ISA. Since the x86 ISA and support hardware remained relatively constant, by the Pentium 4 era, x86 support was estimated to account for 10% of the transistor count.

Ars Technica' Jon Stokes touches on this x86-RISC decoding cost on The Pentium: An Architectural History of the World's Most Famous Desktop Processor.

0
votes

When talking about x86 processors from the 80386 and up, "x86 legacy support" refers to the ability to run all the 16-bit instructions found on the 8086/80186/80286 and to simulate all their memory addressing modes: the 8086's 20-bit real-mode and the 80286's 24-bit protected-mode.

On top of that, the 80386 introduced v86-mode, which simulates real-mode while the processor continues running in 32-bit protected-mode.

That's three dramatically different modes that every 80386 (and up) supports to this day--all to support 16-bit code that very few people run anymore.