I've found the MMIX port to be a good place to start. It's a bit old
but the archtecture is nice and simple and the implementation nice and
brief. Watch out though as it is a pure 64 bit machine - you'll need
to think SI every time you see DI.
The trick past there is to compare the significant features of your
machine with existing machines. For example, GCC prefers a 68000
style machine with a set of condition codes, however many machines
only have one condition flag that changes meaning based on what you
are doing.
-- Michael
2009/6/6 Graham Reitz <grahamreitz@gmail.com>:
Is there a machine description template in the gcc file source tree?
If there is also template for the 'C header file of macro
definitions' that
would be good to know too.
I did a file search for '.md' and there are tons of examples.
Although, I
was curious if there was a generic template.
graham