Hacker News new | ask | show | jobs
by pepijndevos 2444 days ago
Say I wrote my own CPU (which I did), which of those tiny C compilers would be easiest to retarget?

My CPU is very small, (~300 LUT4 on an FPGA using Yosys), but has a very minimal ISA. It's mostly an accumulator machine with a stack pointer.

2 comments

SubC is very easy to retarget, especially the book version. It is not a full C compiler, though.

http://t3x.org/subc/

I'm interested in what you mean by "wrote my own CPU". Could you elaborate please?