#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 "25"
(dest)->inst.opcode = (op); \
} 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); \
typedef struct MonoInst MonoInst;
typedef struct MonoCallInst MonoCallInst;
+typedef struct MonoCallArgParm MonoCallArgParm;
typedef struct MonoEdge MonoEdge;
typedef struct MonoMethodVar MonoMethodVar;
typedef struct MonoBasicBlock MonoBasicBlock;
};
/* BBlock flags */
-#define BB_VISITED 1
-#define BB_REACHABLE 2
-#define BB_EXCEPTION_DEAD_OBJ 4
-#define BB_EXCEPTION_UNSAFE 8
+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 {
#endif
};
+struct MonoCallArgParm {
+ MonoInst ins;
+ gint32 size;
+ gint32 offset;
+ gint32 offPrm;
+};
+
/*
* flags for MonoInst
* Note: some of the values overlap, because they can't appear
MONO_OPT_PRECOMP = 1 << 17,
MONO_OPT_ABCREM = 1 << 18,
MONO_OPT_SSAPRE = 1 << 19,
- MONO_OPT_EXCEPTION= 1 << 20
+ 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;
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);
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, char * exname);
+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);