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 int regParmFlg = 0; /* determine if we can register a parameter */
20 static void _z80_reset_regparm()
25 static int _z80_reg_parm(link *l)
27 /* for this processor it is simple
28 can pass only the first parameter in a register */
37 static bool _z80_parseOptions(int *pargc, char **argv, int *i)
42 static void _z80_finaliseOptions(void)
44 port->mem.default_local_map = data;
45 port->mem.default_globl_map = data;
48 static void _z80_setDefaultOptions(void)
50 options.genericPtr = 1; /* default on */
52 options.stackAuto = 1;
53 options.mainreturn = 1;
54 options.noregparms = 1;
55 /* first the options part */
56 options.intlong_rent = 1;
58 optimize.global_cse = 1;
63 optimize.loopInvariant = 1;
64 optimize.loopInduction = 0;
67 static const char *_z80_getRegName(struct regs *reg)
75 /** $1 is always the basename.
76 $2 is always the output file.
78 $l is the list of extra options that should be there somewhere...
79 MUST be terminated with a NULL.
81 static const char *_linkCmd[] = {
82 "link-z80", "-nf", "$1", NULL
85 static const char *_asmCmd[] = {
86 "as-z80", "-plosgff", "$1.o", "$1.asm", NULL
92 "Zilog Z80", /* Target name */
98 "-plosgff", /* Options with debug */
99 "-plosgff", /* Options without debug */
108 /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
109 1, 1, 2, 4, 2, 2, 2, 1, 4, 4
129 /* Z80 has no native mul/div commands */
135 _z80_finaliseOptions,
136 _z80_setDefaultOptions,
140 0, /* no assembler preamble */
141 0, /* no local IVT generation code */