2 Extra bits ontop of the z80 port to target the Gameboy's Z80 like
5 Michael Hope <michaelh@earthling.net> 2000
10 static char _defaultRules[] =
13 #include "peeph-gbz80.rul"
16 static char *_gbz80_keywords[] =
20 _gbz80_parseOptions (int *pargc, char **argv, int *i)
28 z80_opts.sub = SUB_GBZ80;
32 _gbz80_finaliseOptions (void)
34 port->mem.default_local_map = data;
35 port->mem.default_globl_map = data;
39 _gbz80_setDefaultOptions (void)
41 options.genericPtr = 1; /* default on */
43 options.stackAuto = 1;
44 options.mainreturn = 1;
45 /* first the options part */
46 options.intlong_rent = 1;
48 optimize.global_cse = 1;
53 optimize.loopInvariant = 1;
54 optimize.loopInduction = 0;
58 _gbz80_getRegName (struct regs *reg)
66 /** $1 is always the basename.
67 $2 is always the output file.
69 $l is the list of extra options that should be there somewhere...
70 MUST be terminated with a NULL.
72 static const char *_linkCmd[] =
74 "link-gbz80", "-nf", "$1", NULL
77 static const char *_asmCmd[] =
79 "as-gbz80", "-plosgff", "$1.o", "$1.asm", NULL
86 "Gameboy Z80-like", /* Target name */
92 "-plosgff", /* Options with debug */
93 "-plosgff", /* Options without debug */
104 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
105 1, 1, 2, 4, 2, 2, 2, 1, 4, 4
125 /* Z80 has no native mul/div commands */
131 _gbz80_finaliseOptions,
132 _gbz80_setDefaultOptions,
136 0, /* no assembler preamble */
137 0, /* no local IVT generation code */