#define inst_ms_word data.op[0].const_val
#endif
-#if SIZEOF_VOID_P == 8
-#define OP_PCONST OP_I8CONST
-#else
-#define OP_PCONST OP_ICONST
-#endif
-
/* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION "24"
+#define MONO_AOT_FILE_VERSION "25"
#if 1
#define mono_bitset_test_fast(set,n) (((guint32*)set)[2+(n)/32] & (1 << ((n) % 32)))
};
/* BBlock flags */
-#define BB_VISITED 1
-#define BB_REACHABLE 2
+enum {
+ BB_VISITED = 1 << 0,
+ BB_REACHABLE = 1 << 1,
+ BB_EXCEPTION_DEAD_OBJ = 1 << 2,
+ BB_EXCEPTION_UNSAFE = 1 << 3,
+ BB_EXCEPTION_HANDLER = 1 << 4
+};
struct MonoInst {
union {
MONO_OPT_AOT = 1 << 16,
MONO_OPT_PRECOMP = 1 << 17,
MONO_OPT_ABCREM = 1 << 18,
- MONO_OPT_SSAPRE = 1 << 19
+ MONO_OPT_SSAPRE = 1 << 19,
+ MONO_OPT_EXCEPTION= 1 << 20,
+ MONO_OPT_SSA = 1 << 21
};
/* Bit-fields in the MonoBasicBlock.region */
MonoMethod *inlined_method; /* the method which is currently inlined */
MonoInst *domainvar; /* a cache for the current domain */
MonoInst *got_var; /* Global Offset Table variable */
+
+ struct MonoAliasingInformation *aliasing_info;
/* A hashtable of region ID-> SP var mappings */
/* An SP var is a place to store the stack pointer (used by handlers)*/
/* values for MonoInst.ssa_op */
enum {
- MONO_SSA_NOP,
- MONO_SSA_LOAD,
- MONO_SSA_STORE,
- MONO_SSA_MAYBE_LOAD,
- MONO_SSA_MAYBE_STORE
+ MONO_SSA_NOP = 0,
+ MONO_SSA_ADDRESS_TAKEN = 1,
+ MONO_SSA_LOAD = 2,
+ MONO_SSA_STORE = 4,
+ MONO_SSA_LOAD_STORE = MONO_SSA_LOAD|MONO_SSA_STORE,
+ MONO_SSA_INDIRECT_LOAD = MONO_SSA_LOAD|MONO_SSA_ADDRESS_TAKEN,
+ MONO_SSA_INDIRECT_STORE = MONO_SSA_STORE|MONO_SSA_ADDRESS_TAKEN,
+ MONO_SSA_INDIRECT_LOAD_STORE =
+ MONO_SSA_LOAD|MONO_SSA_STORE|MONO_SSA_ADDRESS_TAKEN
};
#define OP_CEQ (256+CEE_CEQ)
#undef MINI_OP
#if SIZEOF_VOID_P == 8
+#define OP_PCONST OP_I8CONST
#define OP_PADD OP_LADD
#define OP_PNEG OP_LNEG
#define OP_PCONV_TO_U2 OP_LCONV_TO_U2
#define OP_STOREP_MEMBASE_REG OP_STOREI8_MEMBASE_REG
#define OP_STOREP_MEMBASE_IMM OP_STOREI8_MEMBASE_IMM
#else
+#define OP_PCONST OP_ICONST
#define OP_PADD CEE_ADD
#define OP_PNEG CEE_NEG
#define OP_PCONV_TO_U2 CEE_CONV_U2
typedef struct {
gboolean handle_sigint;
gboolean keep_delegates;
- gboolean abort_on_sigsegv;
+ gboolean collect_pagefault_stats;
} MonoDebugOptions;
enum {
void mono_print_tree_nl (MonoInst *tree);
void mono_print_code (MonoCompile *cfg);
void mono_print_method_from_ip (void *ip);
+char *mono_pmip (void *ip);
void mono_select_instructions (MonoCompile *cfg);
const char* mono_inst_name (int op);
void mono_inst_foreach (MonoInst *tree, MonoInstFunc func, gpointer data);
int mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options);
MonoCompile *mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, gboolean run_cctors, gboolean compile_aot, int parts);
void mono_destroy_compile (MonoCompile *cfg);
+
void mono_aot_init (void);
MonoJitInfo* mono_aot_get_method (MonoDomain *domain,
MonoMethod *method);
gboolean mono_aot_init_vtable (MonoVTable *vtable);
gboolean mono_aot_get_cached_class_info (MonoClass *klass, MonoCachedClassInfo *res);
MonoJitInfo* mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr);
+void mono_aot_set_make_unreadable (gboolean unreadable);
+gboolean mono_aot_is_pagefault (void *ptr);
+void mono_aot_handle_pagefault (void *ptr);
+guint32 mono_aot_get_n_pagefaults (void);
gboolean mono_method_blittable (MonoMethod *method);
gboolean mono_method_same_domain (MonoJitInfo *caller, MonoJitInfo *callee);
gint32* mono_allocate_stack_slots_full (MonoCompile *cfg, gboolean backward, guint32 *stack_size, guint32 *stack_align);
gint32* mono_allocate_stack_slots (MonoCompile *cfg, guint32 *stack_size, guint32 *stack_align);
void mono_local_regalloc (MonoCompile *cfg, MonoBasicBlock *bb);
+MonoInst *mono_branch_optimize_exception_target (MonoCompile *cfg, MonoBasicBlock *bb, const char * exname);
/* methods that must be provided by the arch-specific port */
void mono_arch_cpu_init (void);
/* Exception handling */
gboolean mono_handle_exception (MonoContext *ctx, gpointer obj,
gpointer original_ip, gboolean test_only);
-void mono_jit_walk_stack (MonoStackWalk func, gboolean do_il_offset, gpointer user_data);
+void mono_handle_native_sigsegv (void *sigctx);
+void mono_jit_walk_stack (MonoStackWalk func, gboolean do_il_offset, gpointer user_data);
void mono_setup_altstack (MonoJitTlsData *tls);
void mono_free_altstack (MonoJitTlsData *tls);
MonoMethod *method, guint8 *code_start,
guint8 *debug_info, guint32 debug_info_len);
void mono_debug_add_icall_wrapper (MonoMethod *method, MonoJitICallInfo* info);
-
+void mono_debugger_run_finally (MonoContext *start_ctx);
/* Tracing */
MonoTraceSpec *mono_trace_parse_options (char *options);