-/*
- * tramp-x86.c: JIT trampoline code for x86
+/**
+ * \file
+ * JIT trampoline code for x86
*
* Authors:
* Dietmar Maurer (dietmar@ximian.com)
#include <mono/metadata/metadata-internals.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/tabledefs.h>
-#include <mono/metadata/mono-debug.h>
-#include <mono/metadata/mono-debug-debugger.h>
#include <mono/metadata/profiler-private.h>
#include <mono/metadata/gc-internals.h>
#include <mono/arch/x86/x86-codegen.h>
}
gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
{
guint8 *code, *start;
int buf_len;
unwind_ops = mono_arch_get_cie_program ();
- x86_mov_reg_imm (code, MONO_ARCH_RGCTX_REG, mrgctx);
+ x86_mov_reg_imm (code, MONO_ARCH_RGCTX_REG, arg);
x86_jump_code (code, addr);
g_assert ((code - start) <= buf_len);
static gpointer
handler_block_trampoline_helper (void)
{
- MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+ MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
return jit_tls->handler_block_return_address;
}
* We are in a method frame after the call emitted by OP_CALL_HANDLER.
*/
- if (mono_get_jit_tls_offset () != -1) {
- code = mono_x86_emit_tls_get (code, X86_EAX, mono_get_jit_tls_offset ());
- x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 4);
- } else {
- /*Slow path uses a c helper*/
- x86_call_code (code, handler_block_trampoline_helper);
- }
+ /*Slow path uses a c helper*/
+ x86_call_code (code, handler_block_trampoline_helper);
/* Simulate a call */
/*Fix stack alignment*/
x86_alu_reg_imm (code, X86_SUB, X86_ESP, 0x4);
return buf;
}
+gpointer
+mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
+{
+ g_assert_not_reached ();
+ return NULL;
+}
+