#endif /* TARGET_WIN32 */
+#ifndef DISABLE_JIT
/*
* mono_arch_get_restore_context:
*
/* Restore all registers except %rip and %r11 */
gregs_offset = MONO_STRUCT_OFFSET (MonoContext, gregs);
for (i = 0; i < AMD64_NREG; ++i) {
-#if defined(__native_client_codegen__)
- if (i == AMD64_R15)
- continue;
-#endif
if (i != AMD64_RIP && i != AMD64_RSP && i != AMD64_R8 && i != AMD64_R9 && i != AMD64_R10 && i != AMD64_R11)
amd64_mov_reg_membase (code, i, AMD64_R11, gregs_offset + (i * 8), 8);
}
/* jump to the saved IP */
amd64_jump_reg (code, AMD64_R11);
- nacl_global_codeman_validate (&start, 256, &code);
-
mono_arch_flush_icache (start, code - start);
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
guint32 pos;
MonoJumpInfo *ji = NULL;
GSList *unwind_ops = NULL;
- const guint kMaxCodeSize = NACL_SIZE (128, 256);
+ const guint kMaxCodeSize = 128;
start = code = (guint8 *)mono_global_codeman_reserve (kMaxCodeSize);
amd64_mov_reg_membase (code, AMD64_RBP, AMD64_ARG_REG1, gregs_offset + (AMD64_RBP * 8), 8);
/* load callee saved regs */
for (i = 0; i < AMD64_NREG; ++i) {
-#if defined(__native_client_codegen__)
- if (i == AMD64_R15)
- continue;
-#endif
if (AMD64_IS_CALLEE_SAVED_REG (i) && i != AMD64_RBP)
amd64_mov_reg_membase (code, i, AMD64_ARG_REG1, gregs_offset + (i * 8), 8);
}
g_assert ((code - start) < kMaxCodeSize);
- nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
-
mono_arch_flush_icache (start, code - start);
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
return start;
}
+#endif /* !DISABLE_JIT */
/*
* The first few arguments are dummy, to force the other arguments to be passed on
mono_resume_unwind (&ctx);
}
+#ifndef DISABLE_JIT
/*
* get_throw_trampoline:
*
MonoJumpInfo *ji = NULL;
GSList *unwind_ops = NULL;
int i, stack_size, arg_offsets [16], ctx_offset, regs_offset, dummy_stack_space;
- const guint kMaxCodeSize = NACL_SIZE (256, 512);
+ const guint kMaxCodeSize = 256;
#ifdef TARGET_WIN32
dummy_stack_space = 6 * sizeof(mgreg_t); /* Windows expects stack space allocated for all 6 dummy args. */
g_assert ((code - start) < kMaxCodeSize);
- nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
if (info)
{
return get_throw_trampoline (info, FALSE, TRUE, FALSE, FALSE, "throw_corlib_exception", aot);
}
+#endif /* !DISABLE_JIT */
/*
* mono_arch_unwind_frame:
return lmf->rip;
}
+#ifndef DISABLE_JIT
GSList*
mono_amd64_get_exception_trampolines (gboolean aot)
{
return tramps;
}
+#endif /* !DISABLE_JIT */
void
mono_arch_exceptions_init (void)
}
}
-#ifdef TARGET_WIN32
+#if defined(TARGET_WIN32) && !defined(DISABLE_JIT)
/*
* The mono_arch_unwindinfo* methods are used to build and add
RtlInstallFunctionTableCallback (((DWORD64)code) | 0x3, (DWORD64)code, code_size, MONO_GET_RUNTIME_FUNCTION_CALLBACK, code, NULL);
}
-#endif
+#endif /* defined(TARGET_WIN32) !defined(DISABLE_JIT) */
-#if MONO_SUPPORT_TASKLETS
+#if MONO_SUPPORT_TASKLETS && !defined(DISABLE_JIT)
MonoContinuationRestore
mono_tasklets_arch_restore (void)
{
static guint8* saved = NULL;
guint8 *code, *start;
int cont_reg = AMD64_R9; /* register usable on both call conventions */
- const guint kMaxCodeSize = NACL_SIZE (64, 128);
+ const guint kMaxCodeSize = 64;
if (saved)
amd64_jump_membase (code, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_ip));
g_assert ((code - start) <= kMaxCodeSize);
- nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
mono_arch_flush_icache (start, code - start);
mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
saved = start;
return (MonoContinuationRestore)saved;
}
-#endif
+#endif /* MONO_SUPPORT_TASKLETS && !defined(DISABLE_JIT) */
/*
* mono_arch_setup_resume_sighandler_ctx:
MONO_CONTEXT_SET_SP (ctx, (guint64)MONO_CONTEXT_GET_SP (ctx) - 8);
MONO_CONTEXT_SET_IP (ctx, func);
}
+
+#ifdef DISABLE_JIT
+gpointer
+mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+
+gpointer
+mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+
+gpointer
+mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+
+gpointer
+mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+
+gpointer
+mono_arch_get_throw_corlib_exception (MonoTrampInfo **info, gboolean aot)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+
+GSList*
+mono_amd64_get_exception_trampolines (gboolean aot)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+#endif /* DISABLE_JIT */
+
+#if !MONO_SUPPORT_TASKLETS || defined(DISABLE_JIT)
+MonoContinuationRestore
+mono_tasklets_arch_restore (void)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+#endif /* !MONO_SUPPORT_TASKLETS || defined(DISABLE_JIT) */