typedef enum {
MONO_AOT_TRAMP_SPECIFIC = 0,
MONO_AOT_TRAMP_STATIC_RGCTX = 1,
- MONO_AOT_TRAMP_IMT_THUNK = 2,
+ MONO_AOT_TRAMP_IMT = 2,
MONO_AOT_TRAMP_GSHAREDVT_ARG = 3,
MONO_AOT_TRAMP_NUM = 4
} MonoAotTrampoline;
/* Blocks of various kinds of trampolines */
gpointer specific_trampolines;
gpointer static_rgctx_trampolines;
- gpointer imt_thunks;
+ gpointer imt_trampolines;
gpointer gsharedvt_arg_trampolines;
/* In static mode, points to a table of global symbols for trampolines etc */
gpointer globals;
#define MONO_IS_SETCC(ins) ((((ins)->opcode >= OP_CEQ) && ((ins)->opcode <= OP_CLT_UN)) || (((ins)->opcode >= OP_ICEQ) && ((ins)->opcode <= OP_ICLE_UN)) || (((ins)->opcode >= OP_LCEQ) && ((ins)->opcode <= OP_LCLT_UN)) || (((ins)->opcode >= OP_FCEQ) && ((ins)->opcode <= OP_FCLT_UN)))
+#define MONO_HAS_CUSTOM_EMULATION(ins) (((ins)->opcode >= OP_FBEQ && (ins)->opcode <= OP_FBLT_UN) || ((ins)->opcode >= OP_FCEQ && (ins)->opcode <= OP_FCLT_UN))
#define MONO_IS_LOAD_MEMBASE(ins) (((ins)->opcode >= OP_LOAD_MEMBASE && (ins)->opcode <= OP_LOADV_MEMBASE) || ((ins)->opcode >= OP_ATOMIC_LOAD_I1 && (ins)->opcode <= OP_ATOMIC_LOAD_R8))
#define MONO_IS_STORE_MEMBASE(ins) (((ins)->opcode >= OP_STORE_MEMBASE_REG && (ins)->opcode <= OP_STOREV_MEMBASE) || ((ins)->opcode >= OP_ATOMIC_STORE_I1 && (ins)->opcode <= OP_ATOMIC_STORE_R8))
/* INEG sets the condition codes, and the OP_LNEG decomposition depends on this on x86 */
#define MONO_INS_HAS_NO_SIDE_EFFECT(ins) (MONO_IS_MOVE (ins) || (ins->opcode == OP_ICONST) || (ins->opcode == OP_I8CONST) || MONO_IS_ZERO (ins) || (ins->opcode == OP_ADD_IMM) || (ins->opcode == OP_R8CONST) || (ins->opcode == OP_LADD_IMM) || (ins->opcode == OP_ISUB_IMM) || (ins->opcode == OP_IADD_IMM) || (ins->opcode == OP_LNEG) || (ins->opcode == OP_ISUB) || (ins->opcode == OP_CMOV_IGE) || (ins->opcode == OP_ISHL_IMM) || (ins->opcode == OP_ISHR_IMM) || (ins->opcode == OP_ISHR_UN_IMM) || (ins->opcode == OP_IAND_IMM) || (ins->opcode == OP_ICONV_TO_U1) || (ins->opcode == OP_ICONV_TO_I1) || (ins->opcode == OP_SEXT_I4) || (ins->opcode == OP_LCONV_TO_U1) || (ins->opcode == OP_ICONV_TO_U2) || (ins->opcode == OP_ICONV_TO_I2) || (ins->opcode == OP_LCONV_TO_I2) || (ins->opcode == OP_LDADDR) || (ins->opcode == OP_PHI) || (ins->opcode == OP_NOP) || (ins->opcode == OP_ZEXT_I4) || (ins->opcode == OP_NOT_NULL) || (ins->opcode == OP_IL_SEQ_POINT))
-#define MONO_METHOD_IS_FINAL(m) (((m)->flags & METHOD_ATTRIBUTE_FINAL) || ((m)->klass && ((m)->klass->flags & TYPE_ATTRIBUTE_SEALED)))
+#define MONO_INS_IS_PCONST_NULL(ins) ((ins)->opcode == OP_PCONST && (ins)->inst_p0 == 0)
+
+#define MONO_METHOD_IS_FINAL(m) (((m)->flags & METHOD_ATTRIBUTE_FINAL) || ((m)->klass && (mono_class_get_flags ((m)->klass) & TYPE_ATTRIBUTE_SEALED)))
#ifdef MONO_ARCH_SIMD_INTRINSICS
guint emulate_div : 1;
guint emulate_long_shift_opts : 1;
guint have_objc_get_selector : 1;
- guint have_generalized_imt_thunk : 1;
+ guint have_generalized_imt_trampoline : 1;
guint have_tls_get : 1;
guint have_tls_get_reg : 1;
guint have_liverange_ops: 1;
guint need_got_var : 1;
guint need_div_check : 1;
guint no_unaligned_access : 1;
+ guint disable_div_with_mul : 1;
int monitor_enter_adjustment;
int dyn_call_param_area;
} MonoBackend;
guint8 *thunks;
/* Offset between the start of code and the thunks area */
int thunks_offset;
- guint32 exception_type; /* MONO_EXCEPTION_* */
+ MonoExceptionType exception_type; /* MONO_EXCEPTION_* */
guint32 exception_data;
char* exception_message;
gpointer exception_ptr;
gpointer mono_aot_get_unbox_trampoline (MonoMethod *method);
gpointer mono_aot_get_lazy_fetch_trampoline (guint32 slot);
gpointer mono_aot_get_static_rgctx_trampoline (gpointer ctx, gpointer addr);
-gpointer mono_aot_get_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count, gpointer fail_tramp);
+gpointer mono_aot_get_imt_trampoline (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count, gpointer fail_tramp);
gpointer mono_aot_get_gsharedvt_arg_trampoline(gpointer arg, gpointer addr);
guint8* mono_aot_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len);
guint32 mono_aot_method_hash (MonoMethod *method);
gpointer mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean is_v4, gboolean aot);
gpointer mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot);
guint8 *mono_arch_create_llvm_native_thunk (MonoDomain *domain, guint8* addr) MONO_LLVM_INTERNAL;
+gpointer mono_arch_get_get_tls_tramp (void);
GList *mono_arch_get_allocatable_int_vars (MonoCompile *cfg);
GList *mono_arch_get_global_int_regs (MonoCompile *cfg);
GList *mono_arch_get_global_fp_regs (MonoCompile *cfg);
gpointer mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, guint32 *code_len);
MonoMethod* mono_arch_find_imt_method (mgreg_t *regs, guint8 *code);
MonoVTable* mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code);
-gpointer mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count, gpointer fail_tramp);
+gpointer mono_arch_build_imt_trampoline (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckItem **imt_entries, int count, gpointer fail_tramp);
void mono_arch_notify_pending_exc (MonoThreadInfo *info);
guint8* mono_arch_get_call_target (guint8 *code);
guint32 mono_arch_get_plt_info_offset (guint8 *plt_entry, mgreg_t *regs, guint8 *code);
* Per-OS implementation functions.
*/
void mono_runtime_install_handlers (void);
+gboolean mono_runtime_install_custom_handlers (const char *handlers);
+void mono_runtime_install_custom_handlers_usage (void);
void mono_runtime_cleanup_handlers (void);
void mono_runtime_setup_stat_profiler (void);
void mono_runtime_shutdown_stat_profiler (void);