Author: zoltan
Date: 2006-09-11 14:34:57 -0400 (Mon, 11 Sep 2006)
New Revision: 65249

Modified:
   trunk/mono/mono/mini/ChangeLog
   trunk/mono/mono/mini/exceptions-amd64.c
   trunk/mono/mono/mini/mini-amd64.h
Log:
2006-09-11  Zoltan Varga  <[EMAIL PROTECTED]>

        * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the 
SC_
        constants.


Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog      2006-09-11 17:49:22 UTC (rev 65248)
+++ trunk/mono/mono/mini/ChangeLog      2006-09-11 18:34:57 UTC (rev 65249)
@@ -1,5 +1,8 @@
 2006-09-11  Zoltan Varga  <[EMAIL PROTECTED]>
 
+       * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the 
SC_
+       constants.
+       
        * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
 
 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>

Modified: trunk/mono/mono/mini/exceptions-amd64.c
===================================================================
--- trunk/mono/mono/mini/exceptions-amd64.c     2006-09-11 17:49:22 UTC (rev 
65248)
+++ trunk/mono/mono/mini/exceptions-amd64.c     2006-09-11 18:34:57 UTC (rev 
65249)
@@ -521,7 +521,7 @@
                                                offset ++;
                                        }
                                        else {
-                                               reg = *((guint64 *)ctx->SC_EBP 
+ offset);
+                                               reg = *((guint64 *)ctx->rbp + 
offset);
                                                offset --;
                                        }
 
@@ -558,16 +558,16 @@
                if (omit_fp) {
                        /* Pop frame */
                        new_ctx->rsp += (ji->used_regs >> 16) & (0x7fff);
-                       new_ctx->SC_EIP = *((guint64 *)new_ctx->rsp) - 1;
+                       new_ctx->rip = *((guint64 *)new_ctx->rsp) - 1;
                        /* Pop return address */
                        new_ctx->rsp += 8;
                }
                else {
                        /* Pop EBP and the return address */
-                       new_ctx->SC_ESP = ctx->SC_EBP + (2 * sizeof (gpointer));
+                       new_ctx->rsp = ctx->rbp + (2 * sizeof (gpointer));
                        /* we substract 1, so that the IP points into the call 
instruction */
-                       new_ctx->SC_EIP = *((guint64 *)ctx->SC_EBP + 1) - 1;
-                       new_ctx->SC_EBP = *((guint64 *)ctx->SC_EBP);
+                       new_ctx->rip = *((guint64 *)ctx->rbp + 1) - 1;
+                       new_ctx->rbp = *((guint64 *)ctx->rbp);
                }
 
                /* Pop arguments off the stack */
@@ -575,7 +575,7 @@
                        MonoJitArgumentInfo *arg_info = g_newa 
(MonoJitArgumentInfo, mono_method_signature (ji->method)->param_count + 1);
 
                        guint32 stack_to_pop = mono_arch_get_argument_info 
(mono_method_signature (ji->method), mono_method_signature 
(ji->method)->param_count, arg_info);
-                       new_ctx->SC_ESP += stack_to_pop;
+                       new_ctx->rsp += stack_to_pop;
                }
 
                return ji;
@@ -592,15 +592,15 @@
                        res->method = (*lmf)->method;
                }
 
-               new_ctx->SC_RIP = (*lmf)->rip;
-               new_ctx->SC_RBP = (*lmf)->ebp;
-               new_ctx->SC_ESP = (*lmf)->rsp;
+               new_ctx->rip = (*lmf)->rip;
+               new_ctx->rbp = (*lmf)->ebp;
+               new_ctx->rsp = (*lmf)->rsp;
 
-               new_ctx->SC_RBX = (*lmf)->rbx;
-               new_ctx->SC_R12 = (*lmf)->r12;
-               new_ctx->SC_R13 = (*lmf)->r13;
-               new_ctx->SC_R14 = (*lmf)->r14;
-               new_ctx->SC_R15 = (*lmf)->r15;
+               new_ctx->rbx = (*lmf)->rbx;
+               new_ctx->r12 = (*lmf)->r12;
+               new_ctx->r13 = (*lmf)->r13;
+               new_ctx->r14 = (*lmf)->r14;
+               new_ctx->r15 = (*lmf)->r15;
 
                *lmf = (*lmf)->previous_lmf;
 

Modified: trunk/mono/mono/mini/mini-amd64.h
===================================================================
--- trunk/mono/mono/mini/mini-amd64.h   2006-09-11 17:49:22 UTC (rev 65248)
+++ trunk/mono/mono/mini/mini-amd64.h   2006-09-11 18:34:57 UTC (rev 65249)
@@ -159,38 +159,6 @@
        guint64 r15;
 } MonoContext;
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
-# define SC_EAX sc_eax
-# define SC_EBX sc_ebx
-# define SC_ECX sc_ecx
-# define SC_EDX sc_edx
-# define SC_EBP sc_ebp
-# define SC_EIP sc_eip
-# define SC_ESP sc_esp
-# define SC_EDI sc_edi
-# define SC_ESI sc_esi
-#else
-# define SC_EAX rax
-# define SC_EBX rbx
-# define SC_ECX rcx
-# define SC_EDX rdx
-# define SC_EBP rbp
-# define SC_EIP rip
-# define SC_ESP rsp
-# define SC_EDI rdi
-# define SC_ESI rsi
-
-# define SC_RIP rip
-# define SC_RSP rsp
-# define SC_RBP rbp
-# define SC_RBX rbx
-# define SC_R12 r12
-# define SC_R13 r13
-# define SC_R14 r14
-# define SC_R15 r15
-
-#endif
-
 #define MONO_CONTEXT_SET_IP(ctx,ip) do { (ctx)->rip = (long)(ip); } while (0); 
 #define MONO_CONTEXT_SET_BP(ctx,bp) do { (ctx)->rbp = (long)(bp); } while (0); 
 #define MONO_CONTEXT_SET_SP(ctx,esp) do { (ctx)->rsp = (long)(esp); } while 
(0); 
@@ -231,6 +199,8 @@
 
 #endif
 
+#endif /* PLATFORM_WIN32 */
+
 #define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS
 #define MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to