annotate mc-codegen.h @ 102:3cf2f8c120b9

*** empty log message ***
author kono
date Sat, 15 Mar 2003 21:55:14 +0900
parents 53899975154c
children c21aeb12b78b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
1
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
2 /* max stack in an expression (for each int, float ) */
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
3 #define MAX_MAX 10
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
4
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
5 extern int creg; /* current register */
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
6 extern int reg_sp; /* REGister Stack-Pointer */
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
7
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
8 extern int *regs; /* 使われているレジスタを示すフラグ */
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
9 extern int *regv; /* 値が入っているかどうか */
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
10 extern int reg_stack[MAX_MAX]; /* 実際のレジスタの領域 */
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
11
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
12 /* floating point registers */
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
13
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
14 extern int freg; /* current floating point register */
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
15 extern int freg_sp; /* floating point REGister Stack-Pointer */
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
16
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
17 extern int *fregs; /* 使われているレジスタを示すフラグ */
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
18 extern int *fregv; /* 値が入っているかどうか */
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
19 extern int freg_stack[MAX_MAX]; /* 実際のレジスタの領域 */
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
20
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
21 extern int use; /* generated value will be used in gexpr */
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
22
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
23 /* function provided by mc-codegen.c */
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
24
102
3cf2f8c120b9 *** empty log message ***
kono
parents: 99
diff changeset
25 extern void codegen_init();
3cf2f8c120b9 *** empty log message ***
kono
parents: 99
diff changeset
26
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
27 extern void def_label(int cslabel, int dlabel);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
28 extern int backdef(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
29 extern int free_register_count(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
30 extern int fwdlabel(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
31 extern void b_expr(int e1, char cond, int l1,int err);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
32 extern void bexpr(int e1, char cond, int l1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
33 extern void emit_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
34 extern void fwddef(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
35
98
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
36 extern int is_code(NMTBL *fnptr);
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
37 extern int is_function(NMTBL *fnptr);
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
38
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
39 extern int csvalue();
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
40 extern void cmpdimm(int e, int csreg);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
41 extern void code_enter(char *name) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
42 extern void code_enter1(int args);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
43 extern void code_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
44 extern void code_leave(char *name) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
45 extern void emit_data(int e, int t, NMTBL *n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
46 extern void emit_data_closing(NMTBL *n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
47 extern void emit_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
48 extern void enter(char *name);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
49 extern void enter1();
94
1ad7045741a7 float dbinop fix
kono
parents: 89
diff changeset
50 extern int g_expr(int e1);
99
53899975154c *** empty log message ***
kono
parents: 98
diff changeset
51 extern int g_expr_u(int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
52 extern void gen_comment(char *s);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
53 extern void gen_gdecl(char *n, int gpc);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
54 extern void gen_source(char *s);
94
1ad7045741a7 float dbinop fix
kono
parents: 89
diff changeset
55 extern int gexpr(int e1,int use);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
56 extern void gexpr_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
57 extern void jcond(int l, char cond);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
58 extern void jmp(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
59 extern void jmp_eq_label(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
60 extern void jmp_label(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
61 extern void leave(int control, char *name);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
62 extern void opening(char *filename);
66
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
63 extern void closing();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
64 extern void ret(void);
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
65 extern void creg_destroy();
89
917947ffeb7c power pc version
kono
parents: 83
diff changeset
66 extern void arg_register(NMTBL *fnptr);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
67
99
53899975154c *** empty log message ***
kono
parents: 98
diff changeset
68 extern int contains(int e,int type);
53899975154c *** empty log message ***
kono
parents: 98
diff changeset
69
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
70 /* floating point */
f94ca1168520 float first try...
kono
parents: 79
diff changeset
71
f94ca1168520 float first try...
kono
parents: 79
diff changeset
72 extern void dassop(int e1);
f94ca1168520 float first try...
kono
parents: 79
diff changeset
73 extern void dmachinop(int e1);
f94ca1168520 float first try...
kono
parents: 79
diff changeset
74 extern void dassign(int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
75
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
76 /* end */