Merge pull request #1412 from esdrubal/stackframe
[mono.git] / mono / mini / mini.h
index 18d9425211079705913656a72d5e16d871661bf0..2169a79423f1b5440e27fd30fd9736a56b807dc8 100755 (executable)
 #endif
 
 /* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 103
+#define MONO_AOT_FILE_VERSION 104
 
 //TODO: This is x86/amd64 specific.
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
 #define printf g_print
 #endif
 
-#if !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR)
-#define MONO_JIT_TLS_DATA_HAS_LMF
-#endif
-
 #define MONO_TYPE_IS_PRIMITIVE(t) ((!(t)->byref && ((((t)->type >= MONO_TYPE_BOOLEAN && (t)->type <= MONO_TYPE_R8) || ((t)->type >= MONO_TYPE_I && (t)->type <= MONO_TYPE_U)))))
 
 /* Constants used to encode different types of methods in AOT */
@@ -337,15 +333,9 @@ typedef MonoStackFrameInfo StackFrameInfo;
 #define mono_bitset_foreach_bit(set,b,n) \
        for (b = 0; b < n; b++)\
                if (mono_bitset_test_fast(set,b))
-#define mono_bitset_foreach_bit_rev(set,b,n) \
-       for (b = n - 1; b >= 0; b--)\
-               if (mono_bitset_test_fast(set,b))
 #else
 #define mono_bitset_foreach_bit(set,b,n) \
        for (b = mono_bitset_find_start (set); b < n && b >= 0; b = mono_bitset_find_first (set, b))
-#define mono_bitset_foreach_bit_rev(set,b,n) \
-       for (b = mono_bitset_find_last (set, n - 1); b >= 0; b = b ? mono_bitset_find_last (set, b) : -1)
 #endif
 
 /*
@@ -382,11 +372,6 @@ enum {
         (dest)->inst.cil_code = (cfg)->ip;  \
        } while (0)
 
-#define MONO_INST_NEW_CALL_ARG(cfg,dest,op) do {       \
-               (dest) = mono_mempool_alloc0 ((cfg)->mempool, sizeof (MonoCallArgParm));        \
-               (dest)->ins.opcode = (op);      \
-       } while (0)
-
 #define MONO_ADD_INS(b,inst) do {      \
                if ((b)->last_ins) {    \
                        (b)->last_ins->next = (inst);   \
@@ -1431,6 +1416,7 @@ typedef struct {
        guint            code_len;
        guint            prolog_end;
        guint            epilog_begin;
+       guint            epilog_end;
        regmask_t        used_int_regs;
        guint32          opt;
        guint32          prof_options;
@@ -1612,6 +1598,9 @@ typedef struct {
        /* The offsets of the locals area relative to the frame pointer */
        gint locals_min_stack_offset, locals_max_stack_offset;
 
+       /* The current CFA rule */
+       int cur_cfa_reg, cur_cfa_offset;
+
        /* The final CFA rule at the end of the prolog */
        int cfa_reg, cfa_offset;
 
@@ -1625,6 +1614,9 @@ typedef struct {
        guint8 *gc_map;
        guint32 gc_map_size;
 
+       /* Error handling */
+       MonoError error;
+
        /* Stats */
        int stat_allocate_var;
        int stat_locals_stack_size;
@@ -2745,8 +2737,6 @@ enum {
        SIMD_VERSION_INDEX_END = 6 
 };
 
-#define MASK(x) (1 << x)
-
 enum {
        SIMD_COMP_EQ,
        SIMD_COMP_LT,