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[] =
12 #include "peeph-gbz80.rul"
15 static char *_gbz80_keywords[] = { NULL };
17 static bool _gbz80_parseOptions(int *pargc, char **argv, int *i)
22 static void _gbz80_init(void)
24 z80_opts.sub = SUB_GBZ80;
27 static void _gbz80_finaliseOptions(void)
31 static void _gbz80_setDefaultOptions(void)
33 options.genericPtr = 1; /* default on */
35 options.stackAuto = 1;
36 options.mainreturn = 1;
37 options.noregparms = 1;
38 /* first the options part */
39 options.intlong_rent = 1;
41 optimize.global_cse = 1;
46 optimize.loopInvariant = 1;
47 optimize.loopInduction = 0;
50 static const char *_gbz80_getRegName(struct regs *reg)
58 /** $1 is always the basename.
59 $2 is always the output file.
61 $l is the list of extra options that should be there somewhere...
62 MUST be terminated with a NULL.
64 static const char *_linkCmd[] = {
65 "link-gb", "-nf", "$1", NULL
68 static const char *_asmCmd[] = {
69 "as-gb", "-plosgff", "$1.o", "$1.asm", NULL
75 "Gameboy Z80-like", /* Target name */
81 "-plosgff", /* Options with debug */
82 "-plosgff", /* Options without debug */
91 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
92 1, 1, 2, 4, 2, 2, 2, 1, 4, 4
109 /* Z80 has no native mul/div commands */
115 _gbz80_finaliseOptions,
116 _gbz80_setDefaultOptions,
120 0, /* no assembler preamble */
121 0, /* no local IVT generation code */