Re:Resources for Amateur Compiler Writers
by nils-m-holm on Monday July 25, 2016 @11:25AM
(#12159291)
I agree, except for the last point.
Unless you are writing an optimizing compiler, you just have to understand the target language well enough to write snippets that resemble the operations of your source or intermediate language, which can be pretty little. See:
http://t3x.org/subc/cg386.c.html
Anecdotally: I have once written an AXP21164 back-end without any prior knowledge, only based on the reference manual. It was not pretty or fast, but it worked.
Nils has an extraordinary amount of compiler related projects and books, http://www.t3x.org/
* The language you are using to write the compiler. You have to know it well enough to write a complex application.
* The language you are compiling. You have to completely understand it.
* The language you are compiling to: x86, JVM, etc. You have to understand it well enough to write every complex application.