Make vassign members gint32 to fix ridiculously large methods.
[mono.git] / mono / mini / regalloc.h
1
2 typedef size_t regmask_t;
3
4 enum {
5         MONO_REG_INT,
6         MONO_REG_DOUBLE,
7         MONO_REG_SIMD
8 };
9
10  
11 #ifdef MONO_ARCH_NEED_SIMD_BANK
12 #define MONO_NUM_REGBANKS 3
13 #else
14 #define MONO_NUM_REGBANKS 2
15 #endif
16
17 typedef struct {
18         /* symbolic registers */
19         int next_vreg;
20
21         regmask_t ifree_mask;
22         regmask_t free_mask [MONO_NUM_REGBANKS];
23
24         /* symbolic -> hard register assignment */
25         /* 
26          * If the register is spilled, then this contains -spill - 1, where 'spill'
27          * is the index of the spill variable.
28          */
29         gint32 *vassign;
30
31         /* hard -> symbolic */
32         int isymbolic [MONO_MAX_IREGS];
33         int fsymbolic [MONO_MAX_FREGS];
34 #ifdef MONO_ARCH_NEED_SIMD_BANK
35         int xsymbolic [MONO_MAX_XREGS];
36 #endif
37         /* Points to the arrays above */
38         int *symbolic [MONO_NUM_REGBANKS];
39
40         int vassign_size;
41 } MonoRegState;
42
43 MonoRegState* mono_regstate_new (void) MONO_INTERNAL;
44
45 void          mono_regstate_free      (MonoRegState *rs) MONO_INTERNAL;