[runtime] Remove ia64 backend, the Itanium architecture is dead. (#4859)
[mono.git] / mono / utils / mono-context.h
index d0cf8cce421380b2918070ea0d3cf65f9a56e7d0..3cc722f0aae7d7909614be82bc9b3f14ab41b121 100644 (file)
@@ -771,89 +771,7 @@ typedef struct MonoContext {
 
 #define MONO_ARCH_HAS_MONO_CONTEXT 1
 
-#elif defined(__ia64__) /*defined(__sparc__) || defined(sparc) */
-
-#ifndef UNW_LOCAL_ONLY
-
-#define UNW_LOCAL_ONLY
-#include <libunwind.h>
-
-#endif
-
-typedef struct MonoContext {
-       unw_cursor_t cursor;
-       /* Whenever the ip in 'cursor' points to the ip where the exception happened */
-       /* This is true for the initial context for exceptions thrown from signal handlers */
-       gboolean precise_ip;
-} MonoContext;
-
-/*XXX SET_BP is missing*/
-#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_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))))
-
-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);
-
-       if (ctx->precise_ip) {
-               return ip;
-       } else {
-               /* 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;
-}
-
-#elif ((defined(__mips__) && !defined(MONO_CROSS_COMPILE)) || (defined(TARGET_MIPS))) && SIZEOF_REGISTER == 4 /* defined(__ia64__) */
+#elif ((defined(__mips__) && !defined(MONO_CROSS_COMPILE)) || (defined(TARGET_MIPS))) && SIZEOF_REGISTER == 4
 
 #define MONO_ARCH_HAS_MONO_CONTEXT 1