3 static char _defaultRules[] =
6 #include "peeph-z80.rul"
11 static char *_z80_keywords[] = { NULL };
13 static void _z80_init(void)
15 z80_opts.sub = SUB_Z80;
18 static bool _z80_parseOptions(int *pargc, char **argv, int *i)
23 static void _z80_finaliseOptions(void)
25 port->mem.default_local_map = data;
26 port->mem.default_globl_map = data;
29 static void _z80_setDefaultOptions(void)
31 options.genericPtr = 1; /* default on */
33 options.stackAuto = 1;
34 options.mainreturn = 1;
35 options.noregparms = 1;
36 /* first the options part */
37 options.intlong_rent = 1;
39 optimize.global_cse = 1;
44 optimize.loopInvariant = 1;
45 optimize.loopInduction = 0;
48 static const char *_z80_getRegName(struct regs *reg)
56 /** $1 is always the basename.
57 $2 is always the output file.
59 $l is the list of extra options that should be there somewhere...
60 MUST be terminated with a NULL.
62 static const char *_linkCmd[] = {
63 "link-z80", "-nf", "$1", NULL
66 static const char *_asmCmd[] = {
67 "as-z80", "-plosgff", "$1.o", "$1.asm", NULL
73 "Zilog Z80", /* Target name */
79 "-plosgff", /* Options with debug */
80 "-plosgff", /* Options without debug */
89 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
90 1, 1, 2, 4, 2, 2, 2, 1, 4, 4
110 /* Z80 has no native mul/div commands */
116 _z80_finaliseOptions,
117 _z80_setDefaultOptions,
121 0, /* no assembler preamble */
122 0, /* no local IVT generation code */