Does a compiler use all x86 instructions? (2010)
And therein lies the rub.<p>What is the minimum number of instructions a compiler could make use of to get everything done that it needs?<p>I came across an article that says &#x27;mov is turing complete&#x27; [1]. But they had to do some convoluted tricks to use mov for all purposes.<p>I think it&#x27;s safe to say that about 5-7 instructions are all that&#x27;s needed to perform all computation tasks.<p>But then:<p>- Why do compilers not strive to simplify their code-gen phase, or enable themselves to do advanced instruction-level program analysis, or both?<p>- Why do microprocessors not strive for simplicity, implement only a handful of instructions in an optimized way, with a very small chip footprint, to be followed by proliferation of cores (think 256-core, 512-core, 1024-core).<p>Besides the completely valid reason that humans tend to overly-complicate their solutions, and then brag about it, the main reason is historical baggage and the need for backwards compatibility.<p>Intel started with a bad architecture design, and only made it worse decades after decades, by piling one bunch of instructions over another, and what we now have is a complete mess.<p>On the compiler front, the LLVM white-knights come along and tell people &#x27;you guys are wimps for using C to do compilers. Real men use monsters like C++, with dragons like design-patterns. No one said compiler programming is supposed to be as simple as possible.&#x27;<p>To those lamenting javascript and the web being broken, wait till you lift the rug and get a peek at the innards of your computing platform and infrastructure!<p>[1] <a href="https:&#x2F;&#x2F;www.cl.cam.ac.uk&#x2F;~sd601&#x2F;papers&#x2F;mov.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cl.cam.ac.uk&#x2F;~sd601&#x2F;papers&#x2F;mov.pdf</a>