How to create a C compiler for custom CPU?

前端 未结 6 1480
长发绾君心
长发绾君心 2021-01-31 08:16

What would be the easiest way to create a C compiler for a custom CPU, assuming of course I already have an assembler for it?

Since a C compiler generates assembly, is t

6条回答
  •  没有蜡笔的小新
    2021-01-31 08:34

    vbcc (at www.compilers.de) is a good and simple retargetable C-compiler written in C. It's much simpler than GCC/LLVM. It's so simple I was able to retarget the compiler to my own CPU with a few weeks of work without having any prior knowledge of compilers.

提交回复
热议问题