annotate mc-codegen.h @ 137:9fb09db54436

fix powerpc get_fregister_var's regs error.
author kono
date Sun, 04 May 2003 22:08:20 +0900
parents 7d436c08e949
children e6e77af048a1
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 ) */
119
b815fcd57b9d input var ( incomplete )
kono
parents: 108
diff changeset
3 #define MAX_MAX 50
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
4
104
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
5 /* flag in regs/fregs */
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
6
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
7 #define INPUT_REG 2 /* input register ( can be reused ) */
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
8 #define USING_REG 1 /* unreusable register usage */
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
9
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
10 extern int creg; /* current register */
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
11 extern int reg_sp; /* REGister Stack-Pointer */
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
12
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
13 extern int *regs; /* 使われているレジスタを示すフラグ */
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
14 extern int *regv; /* 値が入っているかどうか */
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
15 extern int reg_stack[MAX_MAX]; /* 実際のレジスタの領域 */
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
16
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
17 /* floating point registers */
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
18
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
19 extern int freg; /* current floating point register */
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
20 extern int freg_sp; /* floating point REGister Stack-Pointer */
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
21
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
22 extern int *fregs; /* 使われているレジスタを示すフラグ */
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
23 extern int *fregv; /* 値が入っているかどうか */
83
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
24 extern int freg_stack[MAX_MAX]; /* 実際のレジスタの領域 */
f3f75911d62c *** empty log message ***
kono
parents: 81
diff changeset
25
95
185d2cc6a3a9 *** empty log message ***
kono
parents: 94
diff changeset
26 extern int use; /* generated value will be used in gexpr */
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
27
104
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
28 /* function provided by mc-code-*.c */
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
29
105
7e3d59e56a53 save register ( incomplete )
kono
parents: 104
diff changeset
30 extern int get_register_var(NMTBL *);
7e3d59e56a53 save register ( incomplete )
kono
parents: 104
diff changeset
31 extern int get_fregister_var(NMTBL *);
137
9fb09db54436 fix powerpc get_fregister_var's regs error.
kono
parents: 133
diff changeset
32 extern int get_dregister_var(NMTBL *);
9fb09db54436 fix powerpc get_fregister_var's regs error.
kono
parents: 133
diff changeset
33
9fb09db54436 fix powerpc get_fregister_var's regs error.
kono
parents: 133
diff changeset
34 extern void arg_register(NMTBL *fnptr);
104
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
35
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
36 /* function provided by mc-codegen.c */
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
37
102
3cf2f8c120b9 *** empty log message ***
kono
parents: 99
diff changeset
38 extern void codegen_init();
3cf2f8c120b9 *** empty log message ***
kono
parents: 99
diff changeset
39
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
40 extern void def_label(int cslabel, int dlabel);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
41 extern int backdef(void);
137
9fb09db54436 fix powerpc get_fregister_var's regs error.
kono
parents: 133
diff changeset
42 extern int free_register_count(int);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
43 extern int fwdlabel(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
44 extern void b_expr(int e1, char cond, int l1,int err);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
45 extern void bexpr(int e1, char cond, int l1);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
46 extern void emit_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
47 extern void fwddef(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
48
98
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
49 extern int is_code(NMTBL *fnptr);
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
50 extern int is_function(NMTBL *fnptr);
07c2554e1cfa *** empty log message ***
kono
parents: 95
diff changeset
51
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
52 extern int csvalue();
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
53 extern void cmpdimm(int e, int csreg);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
54 extern void code_enter(char *name) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
55 extern void code_enter1(int args);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
56 extern void code_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
57 extern void code_leave(char *name) ;
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
58 extern void emit_data(int e, int t, NMTBL *n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
59 extern void emit_data_closing(NMTBL *n);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
60 extern void emit_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
61 extern void enter(char *name);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
62 extern void enter1();
94
1ad7045741a7 float dbinop fix
kono
parents: 89
diff changeset
63 extern int g_expr(int e1);
99
53899975154c *** empty log message ***
kono
parents: 98
diff changeset
64 extern int g_expr_u(int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
65 extern void gen_comment(char *s);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
66 extern void gen_gdecl(char *n, int gpc);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
67 extern void gen_source(char *s);
94
1ad7045741a7 float dbinop fix
kono
parents: 89
diff changeset
68 extern int gexpr(int e1,int use);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
69 extern void gexpr_init(void);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
70 extern void jcond(int l, char cond);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
71 extern void jmp(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
72 extern void jmp_eq_label(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
73 extern void jmp_label(int l);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
74 extern void leave(int control, char *name);
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
75 extern void opening(char *filename);
66
0b068058dd67 *** empty log message ***
kono
parents: 61
diff changeset
76 extern void closing();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
77 extern void ret(void);
78
8418d4b7caa7 *** empty log message ***
kono
parents: 77
diff changeset
78 extern void creg_destroy();
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
79
99
53899975154c *** empty log message ***
kono
parents: 98
diff changeset
80 extern int contains(int e,int type);
104
c21aeb12b78b *** empty log message ***
kono
parents: 102
diff changeset
81 extern int contains_in_list(int e,int type);
99
53899975154c *** empty log message ***
kono
parents: 98
diff changeset
82
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
83 /* floating point */
f94ca1168520 float first try...
kono
parents: 79
diff changeset
84
f94ca1168520 float first try...
kono
parents: 79
diff changeset
85 extern void dassop(int e1);
133
7d436c08e949 separate float / double flow
kono
parents: 119
diff changeset
86 extern void dmachinop(int e1,int d);
81
f94ca1168520 float first try...
kono
parents: 79
diff changeset
87 extern void dassign(int e1);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
88
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents:
diff changeset
89 /* end */