X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fmini-ia64.h;h=4d4f1df44317af2ca40fe79bc3e1d48c4bded62e;hb=1093d862a671bcf397f34ebcb2e63412d3a43990;hp=45d4b37cc8935ff20a49a56a985ef5040e3b9f06;hpb=9d61782c6e2392d7ceec2006b35be582598a70ae;p=mono.git diff --git a/mono/mini/mini-ia64.h b/mono/mini/mini-ia64.h index 45d4b37cc89..4d4f1df4431 100644 --- a/mono/mini/mini-ia64.h +++ b/mono/mini/mini-ia64.h @@ -4,6 +4,9 @@ #include #include +#include + +#define MONO_ARCH_CPU_SPEC ia64_desc /* FIXME: regset -> 128 bits ! */ @@ -12,10 +15,8 @@ /* Parameters used by the register allocator */ -#define MONO_ARCH_HAS_XP_LOCAL_REGALLOC - /* r8..r11, r14..r29 */ -#define MONO_ARCH_CALLEE_REGS ((regmask_t)(0x700UL) | (regmask_t)(0x3fffc000UL)) +#define MONO_ARCH_CALLEE_REGS ((regmask_t)(0xf00UL) | (regmask_t)(0x3fffc000UL)) /* f6..f15, f34..f127 */ /* FIXME: Use the upper 64 bits as well */ @@ -46,13 +47,8 @@ #define MONO_ARCH_SIGNAL_STACK_SIZE SIGSTKSZ struct MonoLMF { - guint64 ebp; }; -typedef struct MonoContext { - unw_cursor_t cursor; -} MonoContext; - typedef struct MonoCompileArch { gint32 stack_alloc_size; gint32 lmf_offset; @@ -75,68 +71,6 @@ typedef struct MonoCompileArch { GHashTable *branch_targets; } MonoCompileArch; -static inline unw_word_t -mono_ia64_context_get_ip (MonoContext *ctx) -{ - unw_word_t ip; - int err; - - err = unw_get_reg (&ctx->cursor, UNW_IA64_IP, &ip); - g_assert (err == 0); - - /* Subtrack 1 so ip points into the actual instruction */ - return ip - 1; -} - -static inline unw_word_t -mono_ia64_context_get_sp (MonoContext *ctx) -{ - unw_word_t sp; - int err; - - err = unw_get_reg (&ctx->cursor, UNW_IA64_SP, &sp); - g_assert (err == 0); - - return sp; -} - -static inline unw_word_t -mono_ia64_context_get_fp (MonoContext *ctx) -{ - unw_cursor_t new_cursor; - unw_word_t fp; - int err; - - { - unw_word_t ip, sp; - - err = unw_get_reg (&ctx->cursor, UNW_IA64_SP, &sp); - g_assert (err == 0); - - err = unw_get_reg (&ctx->cursor, UNW_IA64_IP, &ip); - g_assert (err == 0); - } - - /* fp is the SP of the parent frame */ - new_cursor = ctx->cursor; - - err = unw_step (&new_cursor); - g_assert (err >= 0); - - err = unw_get_reg (&new_cursor, UNW_IA64_SP, &fp); - g_assert (err == 0); - - return fp; -} - -#define MONO_CONTEXT_SET_IP(ctx,eip) do { int err = unw_set_reg (&(ctx)->cursor, UNW_IA64_IP, (unw_word_t)(eip)); g_assert (err == 0); } while (0) -#define MONO_CONTEXT_SET_BP(ctx,ebp) do { } while (0) -#define MONO_CONTEXT_SET_SP(ctx,esp) do { int err = unw_set_reg (&(ctx)->cursor, UNW_IA64_SP, (unw_word_t)(esp)); g_assert (err == 0); } while (0) - -#define MONO_CONTEXT_GET_IP(ctx) ((gpointer)(mono_ia64_context_get_ip ((ctx)))) -#define MONO_CONTEXT_GET_BP(ctx) ((gpointer)(mono_ia64_context_get_fp ((ctx)))) -#define MONO_CONTEXT_GET_SP(ctx) ((gpointer)(mono_ia64_context_get_sp ((ctx)))) - #define MONO_INIT_CONTEXT_FROM_FUNC(ctx,start_func) do { \ MONO_INIT_CONTEXT_FROM_CURRENT (ctx); \ } while (0) @@ -152,12 +86,14 @@ mono_ia64_context_get_fp (MonoContext *ctx) /* This is ia64 only */ #define MONO_CONTEXT_SET_FUNC(ctx, func) MONO_CONTEXT_SET_IP ((ctx), ((gpointer*)(func))[0]) +#define MONO_ARCH_INIT_TOP_LMF_ENTRY(lmf) + #define MONO_ARCH_CONTEXT_DEF unw_context_t unw_ctx; #define MONO_ARCH_USE_SIGACTION 1 #ifdef HAVE_WORKING_SIGALTSTACK -#define MONO_ARCH_SIGSEGV_ON_ALTSTACK +/*#define MONO_ARCH_SIGSEGV_ON_ALTSTACK*/ #endif unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code); @@ -175,14 +111,12 @@ unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code); #define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1 -#define MONO_ARCH_ENABLE_EMIT_STATE_OPT 1 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1 -#define MONO_ARCH_HAVE_THROW_CORLIB_EXCEPTION 1 -#define MONO_ARCH_HAVE_PIC_AOT 1 -#define MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN 1 -#define MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE 1 #define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1 #define MONO_ARCH_HAVE_SAVE_UNWIND_INFO 1 -#define MONO_ARCH_HAVE_CREATE_VARS 1 +#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1 +#define MONO_ARCH_HAVE_IMT 1 +#define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1 +#define MONO_ARCH_THIS_AS_FIRST_ARG 1 #endif /* __MONO_MINI_IA64_H__ */