Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

World's Thickest Book

Name: Anonymous 2013-01-30 23:10

Name: Anonymous 2013-02-08 15:14

>>73
The quirks in x86 make things harder for compilers, assembly programmers, debuggers, optimizers, OS developers, hardware designers, and hardware testers, and result in hardware that does less while using more power and transistors. Imagine if the billions of dollars that went into x86 instead went into a better architecture. Instead of instructions like DAA and LAHF (both one byte even though they're rarely used), there could be instructions that compilers can actually use. CALL instructions in x86 often need to be followed by a wasteful ADD to adjust the stack, which makes them longer than calls in RISCs. Branch-and-link is better for functional languages because it doesn't impose a stack. A conditional branch-and-link takes 4 bytes in RISC instruction sets. It's more general and more powerful, while also being shorter. Instead of looking at how the compiler can use instructions which ``arose from practical considerations'' in the 70's for Z80 compatibility, look at the types of instructions compilers need. Instead of having x87, MMX, and SSE with huge overlap in functionality, use a single vector/FP architecture.

An elegant instruction set makes for smaller compilers, easier debugging, easier assembly programming, and easier implementation. The last one seems to be the real reason for why Intel keeps pushing x86. Anyone can make a MIPS or ARM, but x86 has so many quirks and kludges that building it from scratch is almost impossible (not to mention that most of them will never be used). There are 4 security rings when everybody only uses 2, partial flag updates, ugly formats for internal structures, Task State Segments with limited hardware task switching, Call Gates, MSRs, SMM, irregular instructions (DIV, string instructions, so many others), encodable instructions that signal a GPF because they exceed 15 bytes, multiple prefixes with undefined behavior, and so many other ``features'' that it would take less time to design an instruction set and compiler than for a third party to implement x86 (even assuming they are able to license the patents from Intel).

Name: Anonymous 2013-02-08 15:32

>>68
The hardware designers shouldn't be dumbing-down the ISA for stupid compiler writers.
It's not ``dumbing-down the ISA'' because the x86 ISA already is dumb. What's dumb is having to push things onto the stack because operands need to be in certain registers. What's dumb is needing "instruction sequences" to do things that RISCs can do with single instructions. What's dumb is booting in 16-bit mode and having megabytes of firmware that can't be used after the boot process because they're still made for 16-bit OSes. What's dumb is still expecting software to fit the hardware even though all of Intel's attempts to do that (TSS task switch, 32-bit segmented mode, A20 line, lack of V86 in the 286) have failed. I find it easier to write assembly for ARM than for x86, but I guess it would be ``dumbing-down the ISA'' for stupid assembly programmers too. Hardware should be designed for the programmer, to fit the software, not the other way around. Why make programmers and compiler writers bend over backwards at Intel's whim?
Perhaps I should say "misguided" and not "stupid", since the problem seems more that they are not approaching the task of code generation in the right way.
What is ``the right way''? Most CPUs have a flat register file and a separate flat register file for floating-point. x86 has quirky integer registers and a stack for floating-point. Do you mean that compilers should use a separate back-end for x86 just because Intel wants to pretend it still has an accumulator?

Name: Anonymous 2013-02-11 10:42

>>93
performance, which is what x86 has always been good at.
wat.

Name: Anonymous 2013-02-11 13:45

>>93
performance, which is what x86 has always been good at.
RISCs were much faster than x86 until Intel and AMD implemented micro-ops. ALPHA still beat x86 until the day it died.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List