In mono/metadata:
[mono.git] / mono / mini / regalloc.h
blob898b1e0a75f0a88f2746c9d818b2096ff295f2ff
2 typedef size_t regmask_t;
4 enum {
5 MONO_REG_INT,
6 MONO_REG_DOUBLE,
7 MONO_REG_SIMD
8 };
11 #ifdef MONO_ARCH_NEED_SIMD_BANK
12 #define MONO_NUM_REGBANKS 3
13 #else
14 #define MONO_NUM_REGBANKS 2
15 #endif
17 typedef struct {
18 /* symbolic registers */
19 int next_vreg;
21 regmask_t ifree_mask;
22 regmask_t free_mask [MONO_NUM_REGBANKS];
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.
29 gint32 *vassign;
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];
40 int vassign_size;
41 } MonoRegState;
43 MonoRegState* mono_regstate_new (void) MONO_INTERNAL;
45 void mono_regstate_free (MonoRegState *rs) MONO_INTERNAL;