* Added common.h
[fw/sdcc] / src / z80 / main.c
1 #include "common.h"
2 #include "main.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 /* Globals */
35 PORT z80_port = {
36     "z80",
37     "Zilog Z80",                /* Target name */
38     {   
39         "as-z80",               /* Assembler executable name */
40         "-plosgff",             /* Options with debug */
41         "-plosgff",             /* Options without debug */
42         TRUE                    /* TRUE if the assembler requires an output name */
43     },
44     {
45         "link-z80",             /* Linker executable name */
46     },
47     {
48         /* Sizes: char, short, int, long, ptr, fptr, gptr, bit, float, max */
49         1, 1, 2, 4, 2, 2, 2, 1, 4, 4
50     },
51     { 
52         -1, 0, 0, 8, 0
53     },
54     /* Z80 has no native mul/div commands */
55     {  
56         0
57     },
58     _z80_parseOptions,
59     _z80_finaliseOptions,
60     _z80_setDefaultOptions,
61     z80_assignRegisters,
62 };
63