I've been reading some SO archives and encountered statements against the x86 architecture.
Why do we need different CPU architecture for server & mini/mainframe & mixed-core? says
"PC architecture is a mess, any OS developer would tell you that."
Is learning Assembly Language worth the effort? (archived) says
"Realize that the x86 architecture is horrible at best"
Any easy way to learn x86 assembler? says
"Most colleges teach assembly on something like MIPS because it's much simpler to understand, x86 assembly is really ugly"
and many more comments like
"Compared to most architectures, X86 sucks pretty badly."
"It's definitely the conventional wisdom that X86 is inferior to MIPS, SPARC, and PowerPC"
"x86 is ugly"
I tried searching but didn't find any reasons. I don't find x86 bad probably because this is the only architecture I'm familiar with.
Can someone kindly give me reasons for considering x86 ugly/bad/inferior compared to others.
The main disadvantage of x86 is the variable length instruction encoding. That means that each instruction depends on the one before it. On most ARM flavors, instructions are 32 bits long, so to decode 3 instructions you fetch 96 bits.
Arguably, within the next 5-10 years, the x86 architecture will go obsolete. It seems extremely hard for Intel and AMD to turn this reality around. Instead, Intel and AMD seem to be in the same position, today, as Motorola and IBM were back in 1995 and 2005 when Apple decided to move its computers to Intel x86 CPUs.
ARM chips, by design, are much more power-efficient than x86 CPUs. They're RISC processors, so they're simpler in design. Also, things like ARM's big. LITTLE configuration help battery life and overall efficiency greatly.
What Does X86 Mean? X86 is the term used to denote the microprocessor family based on the Intel 8086 and 8088 microprocessors. These microprocessors ensure backward compatibility for instruction set architectures. Initially x86 started with an 8-bit instruction set, but then grew to 16- and 32-bit instruction sets.
Couple of possible reasons for it:
IN
and OUT
)x86 assembly code is complicated because x86 is a complicated architecture with many features. An instruction listing for a typical MIPS machine fits on a single letter sized piece of paper. The equivalent listing for x86 fills several pages, and the instructions just do more, so you often need a bigger explanation of what they do than a listing can provide. For example, the MOVSB
instruction needs a relatively large block of C code to describe what it does:
if (DF==0) *(byte*)DI++ = *(byte*)SI++; else *(byte*)DI-- = *(byte*)SI--;
That's a single instruction doing a load, a store, and two adds or subtracts (controlled by a flag input), each of which would be separate instructions on a RISC machine.
While MIPS (and similar architectures) simplicity doesn't necessarily make them superior, for teaching an introduction to assembler class it makes sense to start with a simpler ISA. Some assembly classes teach an ultra-simplified subset of x86 called y86, which is simplified beyond the point of not being useful for real use (e.g. no shift instructions), or some teach just the basic x86 instructions.
EDIT: This is not supposed to be a bash the x86! party. I had little choice but to do some amount of bashing given the way the question's worded. But with the exception of (1), all these things were done for good reasons (see comments). Intel designers aren't stupid -- they wanted to achieve some things with their architecture, and these are some of the taxes they had to pay to make those things a reality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With