X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fregalloc.h;h=c0aa5fdf64a8a37f27bbaced10183f224d0d42ed;hb=04cbe795fa9ff9e3ce50402857053a0a599e9457;hp=e2802e867b9d4314a9e083c2f8560019a629a0fc;hpb=c262c308e4d56e4a37873903d6d2822229c12d99;p=mono.git diff --git a/mono/mini/regalloc.h b/mono/mini/regalloc.h index e2802e867b9..c0aa5fdf64a 100644 --- a/mono/mini/regalloc.h +++ b/mono/mini/regalloc.h @@ -1,20 +1,25 @@ +/** + * \file + */ typedef size_t regmask_t; -enum { - MONO_REG_FREE, - MONO_REG_FREEABLE, - MONO_REG_MOVEABLE, - MONO_REG_BUSY, - MONO_REG_RESERVED -}; - enum { MONO_REG_INT, - MONO_REG_DOUBLE + MONO_REG_DOUBLE, + /* This is used only for allocating spill slots with GC tracking */ + MONO_REG_INT_REF, + /* Ditto for managed pointers */ + MONO_REG_INT_MP, + MONO_REG_SIMD }; -#define MONO_NUM_REGBANKS 2 + +#ifdef MONO_ARCH_NEED_SIMD_BANK +#define MONO_NUM_REGBANKS 5 +#else +#define MONO_NUM_REGBANKS 4 +#endif typedef struct { /* symbolic registers */ @@ -28,25 +33,20 @@ typedef struct { * If the register is spilled, then this contains -spill - 1, where 'spill' * is the index of the spill variable. */ - gint16 *vassign; + gint32 *vassign; /* hard -> symbolic */ int isymbolic [MONO_MAX_IREGS]; int fsymbolic [MONO_MAX_FREGS]; - +#ifdef MONO_ARCH_NEED_SIMD_BANK + int xsymbolic [MONO_MAX_XREGS]; +#endif /* Points to the arrays above */ int *symbolic [MONO_NUM_REGBANKS]; int vassign_size; } MonoRegState; -#define mono_regstate_next_int(rs) ((rs)->next_vreg++) -#define mono_regstate_next_float(rs) ((rs)->next_vreg++) - - -MonoRegState* mono_regstate_new (void) MONO_INTERNAL; - -void mono_regstate_free (MonoRegState *rs) MONO_INTERNAL; -void mono_regstate_reset (MonoRegState *rs) MONO_INTERNAL; -inline int mono_regstate_next_long (MonoRegState *rs) MONO_INTERNAL; +MonoRegState* mono_regstate_new (void); +void mono_regstate_free (MonoRegState *rs);