X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini-sparc.h;h=2c9d8772f68d2777de68676b49c0092ca5834215;hb=5caa7a14918a0e65a1fe25379ba2091777a5b31a;hp=15deaeb42569c2eb241021ca0ac43288540571c5;hpb=42399858d76da2ddcbc91d577df5bee3e729dce9;p=mono.git diff --git a/mono/mini/mini-sparc.h b/mono/mini/mini-sparc.h index 15deaeb4256..2c9d8772f68 100644 --- a/mono/mini/mini-sparc.h +++ b/mono/mini/mini-sparc.h @@ -2,6 +2,7 @@ #define __MONO_MINI_SPARC_H__ #include +#include #include @@ -56,9 +57,6 @@ #define MONO_ARCH_CODE_ALIGNMENT 32 -#define MONO_ARCH_BASEREG sparc_fp -#define MONO_ARCH_RETREG1 sparc_i0 - #ifdef SPARCV9 #define MONO_SPARC_STACK_BIAS 2047 #else @@ -74,25 +72,12 @@ struct MonoLMF { gpointer ebp; }; -typedef struct MonoContext { - guint8 *ip; - gpointer *sp; - gpointer *fp; -} MonoContext; - typedef struct MonoCompileArch { gint32 lmf_offset; gint32 localloc_offset; + void *float_spill_slot; } MonoCompileArch; -#define MONO_CONTEXT_SET_IP(ctx,eip) do { (ctx)->ip = (gpointer)(eip); } while (0); -#define MONO_CONTEXT_SET_BP(ctx,ebp) do { (ctx)->fp = (gpointer*)(ebp); } while (0); -#define MONO_CONTEXT_SET_SP(ctx,esp) do { (ctx)->sp = (gpointer*)(esp); } while (0); - -#define MONO_CONTEXT_GET_IP(ctx) ((gpointer)((ctx)->ip)) -#define MONO_CONTEXT_GET_BP(ctx) ((gpointer)((ctx)->fp)) -#define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->sp)) - #define MONO_INIT_CONTEXT_FROM_FUNC(ctx,start_func) do { \ mono_arch_flush_register_windows (); \ MONO_CONTEXT_SET_IP ((ctx), (start_func)); \ @@ -100,14 +85,9 @@ typedef struct MonoCompileArch { MONO_CONTEXT_SET_SP ((ctx), __builtin_frame_address (0)); \ } while (0) -#ifndef __linux__ -/* - * Can't use sigaction on sparc/linux, since it doesn't support SA_SIGINFO. Instead, we - * have to use the obsolete sigcontext parameter: - * http://www.ussg.iu.edu/hypermail/linux/kernel/0110.3/1531.html. - */ +#define MONO_ARCH_INIT_TOP_LMF_ENTRY(lmf) do { (lmf)->ebp = -1; } while (0) + #define MONO_ARCH_USE_SIGACTION 1 -#endif #ifdef HAVE_WORKING_SIGALTSTACK /*#define MONO_ARCH_SIGSEGV_ON_ALTSTACK*/ @@ -120,12 +100,11 @@ typedef struct MonoCompileArch { #define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1 #define MONO_ARCH_EMULATE_FREM 1 #define MONO_ARCH_NEED_DIV_CHECK 1 -#define MONO_ARCH_ENABLE_EMIT_STATE_OPT 1 -#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1 -#define MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN 1 -#define MONO_ARCH_HAVE_IMT 1 #define MONO_ARCH_IMT_REG sparc_g1 -#define MONO_ARCH_COMMON_VTABLE_TRAMPOLINE 1 +#define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1 +#define MONO_ARCH_HAVE_TLS_INIT 1 + +void mono_arch_tls_init (void); #ifdef SPARCV9 #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS @@ -178,7 +157,7 @@ static void * __builtin_frame_address(int depth) gboolean mono_sparc_is_virtual_call (guint32 *code); -gpointer* mono_sparc_get_vcall_slot_addr (guint32 *code, gpointer *regs); +gpointer* mono_sparc_get_vcall_slot_addr (guint32 *code, mgreg_t *regs); void mono_sparc_flushw (void);