OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

[/] [eco32/] [trunk/] [lcc/] [src/] [config.h] - Blame information for rev 227

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 hellwig
/* $Id: config.h,v 1.1 2002/08/28 23:12:42 drh Exp $ */
2
typedef struct {
3
        unsigned char max_unaligned_load;
4
        Symbol (*rmap)(int);
5
 
6
        void (*blkfetch)(int size, int off, int reg, int tmp);
7
        void (*blkstore)(int size, int off, int reg, int tmp);
8
        void (*blkloop)(int dreg, int doff,
9
                         int sreg, int soff,
10
                         int size, int tmps[]);
11
        void (*_label)(Node);
12
        int (*_rule)(void*, int);
13
        short **_nts;
14
        void (*_kids)(Node, int, Node*);
15
        char **_string;
16
        char **_templates;
17
        char *_isinstruction;
18
        char **_ntname;
19
        void (*emit2)(Node);
20
        void (*doarg)(Node);
21
        void (*target)(Node);
22
        void (*clobber)(Node);
23
} Xinterface;
24
extern int     askregvar(Symbol, Symbol);
25
extern void    blkcopy(int, int, int, int, int, int[]);
26
extern unsigned emitasm(Node, int);
27
extern int     getregnum(Node);
28
extern int     mayrecalc(Node);
29
extern int     mkactual(int, int);
30
extern void    mkauto(Symbol);
31
extern Symbol  mkreg(char *, int, int, int);
32
extern Symbol  mkwildcard(Symbol *);
33
extern int     move(Node);
34
extern int     notarget(Node);
35
extern void    parseflags(int, char **);
36
extern int     range(Node, int, int);
37
extern unsigned regloc(Symbol);  /* omit */
38
extern void    rtarget(Node, int, Symbol);
39
extern void    setreg(Node, Symbol);
40
extern void    spill(unsigned, int, Node);
41
 
42
extern int      argoffset, maxargoffset;
43
extern int      bflag, dflag;
44
extern int      dalign, salign;
45
extern int      framesize;
46
extern unsigned freemask[], usedmask[];
47
extern int      offset, maxoffset;
48
extern int      swap;
49
extern unsigned tmask[], vmask[];
50
typedef struct {
51
        unsigned listed:1;
52
        unsigned registered:1;
53
        unsigned emitted:1;
54
        unsigned copy:1;
55
        unsigned equatable:1;
56
        unsigned spills:1;
57
        unsigned mayrecalc:1;
58
        void *state;
59
        short inst;
60
        Node kids[3];
61
        Node prev, next;
62
        Node prevuse;
63
        short argno;
64
} Xnode;
65
typedef struct {
66
        Symbol vbl;
67
        short set;
68
        short number;
69
        unsigned mask;
70
} *Regnode;
71
enum { IREG=0, FREG=1 };
72
typedef struct {
73
        char *name;
74
        unsigned int eaddr;  /* omit */
75
        int offset;
76
        Node lastuse;
77
        int usecount;
78
        Regnode regnode;
79
        Symbol *wildcard;
80
} Xsymbol;
81
enum { RX=2 };
82
typedef struct {
83
        int offset;
84
        unsigned freemask[2];
85
} Env;
86
 
87
#define LBURG_MAX SHRT_MAX
88
 
89
enum { VREG=(44<<4) };
90
 
91
/* Exported for the front end */
92
extern void             blockbeg(Env *);
93
extern void             blockend(Env *);
94
extern void             emit(Node);
95
extern Node             gen(Node);
96
 
97
#ifdef NDEBUG
98
#define debug(x) (void)0
99
#else
100
#define debug(x) (void)(dflag&&((x),0))
101
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.