Do programming language compilers first translate to assembly or directly to machine code?

前端 未结 13 1969
渐次进展
渐次进展 2020-12-02 09:52

I\'m primarily interested in popular and widely used compilers, such as gcc. But if things are done differently with different compilers, I\'d like to know that, too.

13条回答
  •  离开以前
    2020-12-02 10:39

    GCC compiles to assembler. Some other compilers don't. For example, LLVM-GCC compiles to LLVM-assembly or LLVM-bytecode, which is then compiled to machine code. Almost all compilers have some sort of internal representation, LLVM-GCC use LLVM, and, IIRC, GCC uses something called GIMPLE.

提交回复
热议问题