guint64 eip;
};
-typedef void (* MonoW32ExceptionHandler) (int _dummy, EXCEPTION_RECORD *info, void *context);
+typedef void (* MonoW32ExceptionHandler) (int _dummy, EXCEPTION_POINTERS *info, void *context);
void win32_seh_init(void);
void win32_seh_cleanup(void);
void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler);
struct MonoLMF {
/*
- * If the lowest bit is set to 1, then this LMF has the rip field set. Otherwise,
+ * If the lowest bit is set, then this LMF has the rip field set. Otherwise,
* the rip field is not set, and the rsp field points to the stack location where
* the caller ip is saved.
- * If the second lowest bit is set to 1, then this is a MonoLMFExt structure, and
+ * If the second lowest bit is set, then this is a MonoLMFExt structure, and
* the other fields are not valid.
+ * If the third lowest bit is set, then this is a MonoLMFTramp structure.
*/
gpointer previous_lmf;
- gpointer lmf_addr;
- /* This is only set in trampoline LMF frames */
- MonoMethod *method;
#if defined(__default_codegen__) || defined(HOST_WIN32)
guint64 rip;
#elif defined(__native_client_codegen__)
/* this allows the structure to match for 32-bit compilers. */
guint64 rip __attribute__ ((aligned(8)));
#endif
- guint64 rbx;
guint64 rbp;
guint64 rsp;
- guint64 r12;
- guint64 r13;
- guint64 r14;
- guint64 r15;
-#ifdef HOST_WIN32
- guint64 rdi;
- guint64 rsi;
-#endif
};
+/* LMF structure used by the JIT trampolines */
+typedef struct {
+ struct MonoLMF lmf;
+ guint64 *regs;
+ gpointer lmf_addr;
+} MonoLMFTramp;
+
typedef struct MonoCompileArch {
gint32 localloc_offset;
gint32 reg_save_area_offset;
gint32 stack_alloc_size;
gint32 sp_fp_offset;
+ guint32 saved_iregs;
gboolean omit_fp, omit_fp_computed, no_pushes;
gpointer cinfo;
gint32 async_point_count;
gpointer lmf_var;
} MonoCompileArch;
+
+
+#ifdef HOST_WIN32
+#define PARAM_REGS 4
+#else
+#define PARAM_REGS 6
+#endif
+
+/* Structure used by the sequence points in AOTed code */
+typedef struct {
+ gpointer ss_trigger_page;
+ gpointer bp_trigger_page;
+ gpointer bp_addrs [MONO_ZERO_LEN_ARRAY];
+} SeqPointInfo;
+
+typedef struct {
+ mgreg_t regs [PARAM_REGS];
+ mgreg_t res;
+ guint8 *ret;
+} DynCallArgs;
+
+
#define MONO_CONTEXT_SET_LLVM_EXC_REG(ctx, exc) do { (ctx)->rax = (gsize)exc; } while (0)
#define MONO_ARCH_INIT_TOP_LMF_ENTRY(lmf)
#define MONO_ARCH_NOMAP32BIT
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
#define REG_RAX 7
#define REG_RCX 4
#define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1
#define MONO_ARCH_ENABLE_REGALLOC_IN_EH_BLOCKS 1
-#if !defined(__APPLE__)
#define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
-#endif
#define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
#define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_HAVE_TLS_GET (mono_amd64_have_tls_get ())
#define MONO_ARCH_IMT_REG AMD64_R10
#define MONO_ARCH_IMT_SCRATCH_REG AMD64_R11
#define MONO_ARCH_HAVE_GET_TRAMPOLINES 1
#define MONO_ARCH_AOT_SUPPORTED 1
-#if !defined( HOST_WIN32 ) && !defined( __native_client__ )
+#if !defined( __native_client__ )
#define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
#endif
#define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
#define MONO_ARCH_HAVE_CREATE_LLVM_NATIVE_THUNK 1
#define MONO_ARCH_HAVE_OP_TAIL_CALL 1
+#define MONO_ARCH_HAVE_TRANSLATE_TLS_OFFSET 1
+#define MONO_ARCH_HAVE_DUMMY_INIT 1
#if defined(TARGET_OSX) || defined(__linux__)
#define MONO_ARCH_HAVE_TLS_GET_REG 1
mono_amd64_get_exception_trampolines (gboolean aot) MONO_INTERNAL;
int
-mono_amd64_get_tls_gs_offset (void) MONO_INTERNAL;
+mono_amd64_get_tls_gs_offset (void) MONO_LLVM_INTERNAL;
typedef struct {
guint8 *address;