[MSBuild] Fixed a test that failed when the GAC wasn't available
[mono-project.git] / mono / mini / regalloc.h
blob9e910dc362e231df27f072bcfba0fa59f0264b04
1 #if defined(__native_client__) && defined(__x86_64__)
2 typedef guint64 regmask_t;
3 #else
4 typedef size_t regmask_t;
5 #endif
7 enum {
8 MONO_REG_INT,
9 MONO_REG_DOUBLE,
10 /* This is used only for allocating spill slots with GC tracking */
11 MONO_REG_INT_REF,
12 /* Ditto for managed pointers */
13 MONO_REG_INT_MP,
14 MONO_REG_SIMD
18 #ifdef MONO_ARCH_NEED_SIMD_BANK
19 #define MONO_NUM_REGBANKS 5
20 #else
21 #define MONO_NUM_REGBANKS 4
22 #endif
24 typedef struct {
25 /* symbolic registers */
26 int next_vreg;
28 regmask_t ifree_mask;
29 regmask_t free_mask [MONO_NUM_REGBANKS];
31 /* symbolic -> hard register assignment */
32 /*
33 * If the register is spilled, then this contains -spill - 1, where 'spill'
34 * is the index of the spill variable.
36 gint32 *vassign;
38 /* hard -> symbolic */
39 int isymbolic [MONO_MAX_IREGS];
40 int fsymbolic [MONO_MAX_FREGS];
41 #ifdef MONO_ARCH_NEED_SIMD_BANK
42 int xsymbolic [MONO_MAX_XREGS];
43 #endif
44 /* Points to the arrays above */
45 int *symbolic [MONO_NUM_REGBANKS];
47 int vassign_size;
48 } MonoRegState;
50 MonoRegState* mono_regstate_new (void) MONO_INTERNAL;
52 void mono_regstate_free (MonoRegState *rs) MONO_INTERNAL;