*EDIT* One thing you can do to cut down work is write the compiler yourself, but emit assembler and then rely on existing tools to do the backend code generation. My toy compiler did this, using GCC's assembler to generate the ELF binaries.