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[] = { NULL };
18 static bool _gbz80_parseOptions(int *pargc, char **argv, int *i)
23 static void _gbz80_init(void)
25 z80_opts.sub = SUB_GBZ80;
28 static void _gbz80_finaliseOptions(void)
32 static void _gbz80_setDefaultOptions(void)
34 options.genericPtr = 1; /* default on */
36 options.stackAuto = 1;
37 options.mainreturn = 1;
38 options.noregparms = 1;
39 /* first the options part */
40 options.intlong_rent = 1;
42 optimize.global_cse = 1;
47 optimize.loopInvariant = 1;
48 optimize.loopInduction = 0;
51 static const char *_gbz80_getRegName(struct regs *reg)
59 /** $1 is always the basename.
60 $2 is always the output file.
62 $l is the list of extra options that should be there somewhere...
63 MUST be terminated with a NULL.
65 static const char *_linkCmd[] = {
66 "link-gbz80", "-nf", "$1", NULL
69 static const char *_asmCmd[] = {
70 "as-gbz80", "-plosgff", "$1.o", "$1.asm", NULL
76 "Gameboy Z80-like", /* Target name */
82 "-plosgff", /* Options with debug */
83 "-plosgff", /* Options without debug */
92 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
93 1, 1, 2, 4, 2, 2, 2, 1, 4, 4
111 /* Z80 has no native mul/div commands */
117 _gbz80_finaliseOptions,
118 _gbz80_setDefaultOptions,
122 0, /* no assembler preamble */
123 0, /* no local IVT generation code */