Search code examples
optimizationarchitecturecompiler-constructionassemblylow-level

Why don't compilers generate microinstructions rather than assembly code?


I would like to know why, in the real world, compilers produce Assembly code, rather than microinstructions.

If you're already bound to one architecture, why not go one step further and free the processor from having to turn assembly-code into microinstructions at Runtime?

I think perhaps there's a implementation bottleneck somewhere but I haven't found anything on Google.

EDIT by microinstructions I mean: if you assembly instruction is ADD(R1,R2), the microinstructions would be. Load R1 to the ALU, load R2 to the ALU, execute the operation, load the results back onto R1. Another way to see this is to equate one microinstruction to one clock-cycle.

I was under the impression that microinstruction was the 'official' name. Apparently there's some mileage variation here.

FA


Solution

  • Compilers don't produce micro-instructions because processors don't execute micro-instructions. They are an implementation detail of the chip, not something exposed outside the chip. There's no way to provide micro-instructions to a chip.