Shifted all area names into port. Shifted assembler names and opts
[fw/sdcc] / src / z80 / main.c
1 #include "common.h"
2 #include "ralloc.h"
3
4 void z80_assignRegisters (eBBlock **ebbs, int count);
5
6 static bool _z80_parseOptions(int *pargc, char **argv)
7 {
8     return FALSE;
9 }
10
11 static void _z80_finaliseOptions(void)
12 {
13 }
14
15 static void _z80_setDefaultOptions(void)
16 {    
17     options.genericPtr = 1;   /* default on */
18     options.nopeep    = 1;
19     options.stackAuto = 1;
20     options.mainreturn = 1;
21     options.noregparms = 1;
22     /* first the options part */
23     options.intlong_rent = 1;
24
25     optimize.global_cse = 0;    
26     optimize.label1 = 0;
27     optimize.label2 = 0;
28     optimize.label3 = 0;
29     optimize.label4 = 0;    
30     optimize.loopInvariant = 0;
31     optimize.loopInduction = 0;
32 }
33
34 static const char *_z80_getRegName(struct regs *reg)
35 {
36     if (reg)
37         return reg->name;
38     return "err";
39 }
40
41 /* Globals */
42 PORT z80_port = {
43     "z80",
44     "Zilog Z80",                /* Target name */
45     {   
46         "as-z80",               /* Assembler executable name */
47         "-plosgff",             /* Options with debug */
48         "-plosgff",             /* Options without debug */
49         TRUE                    /* TRUE if the assembler requires an output name */
50     },
51     {
52         "link-z80",             /* Linker executable name */
53     },
54     {
55         /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
56         1, 1, 2, 4, 2, 2, 2, 1, 4, 4
57     },
58     {
59         "_XSEG",
60         "_STACK",
61         "_CODE",
62         "_DATA",
63         "_ISEG",
64         "_XSEG",
65         "_BSEG",
66         "_RSEG",
67         "_GSINIT",
68         "_OVERLAY"
69     },
70     { 
71         -1, 0, 0, 8, 0
72     },
73     /* Z80 has no native mul/div commands */
74     {  
75         0
76     },
77     _z80_parseOptions,
78     _z80_finaliseOptions,
79     _z80_setDefaultOptions,
80     z80_assignRegisters,
81     _z80_getRegName
82 };
83