compiler-constructiontargetplatformtiger

Target architecture for Tiger-compiler


I am writing a Tiger compiler in F# and I have finally reached the point where I can no longer postpone the decision of a target architecture.

This is my first compiler, but it will definitely not be my last. So... what would be a good target architecture for a first compiler?

I have thought about targeting the CIL (.NET), but the intermediate code in the book seems more suited for a register machine.

I would also like to know where I should go when I have finished this compiler. Should I try targeting another architecture? Should I focus on another part of the compiler? Why?


Solution

  • For sheer personal satisfaction, there's no substitute for targeting the hardware you have and and running your compiled code on the bare metal. However, there are reasonable alternatives: