From 16a8b2767f5e9dce68acabf8c9bfcddec2bf2625 Mon Sep 17 00:00:00 2001 From: cwang <cwang> Date: Wed, 19 May 2004 23:32:05 +0000 Subject: [PATCH] amd64 changes --- lisp/os-common.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/os-common.c b/lisp/os-common.c index 879c31513..f15d83fb0 100644 --- a/lisp/os-common.c +++ b/lisp/os-common.c @@ -1,6 +1,6 @@ /* - $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.12 2003/07/19 14:10:16 emarsden Exp $ + $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/os-common.c,v 1.13 2004/05/19 23:32:05 cwang Exp $ This code was written as part of the CMU Common Lisp project at Carnegie Mellon University, and has been placed in the public domain. @@ -319,7 +319,7 @@ os_stack_grows_down (void) static void guard_zones (char **yellow_start, char **red_start) { -#ifdef i386 +#if (defined(i386) || defined(__x86_64)) if (os_stack_grows_down ()) { char *end = (char *) CONTROL_STACK_START; @@ -433,6 +433,11 @@ os_control_stack_overflow (void *fault_addr, struct sigcontext *context) context->sc_eip = (int) ((struct function *) PTR (error))->code; context->sc_ecx = 0; #else +#ifdef __x86_64 + /* RCX is the argument count. */ + context->sc_rip = (unsigned long) ((struct function *) PTR (error))->code; + context->sc_rcx = 0; +#else #ifdef sparc /* This part should be common to all non-x86 ports */ SC_PC(context) = (long) ((struct function *) PTR (error))->code; @@ -445,6 +450,7 @@ os_control_stack_overflow (void *fault_addr, struct sigcontext *context) #else #error os_control_stack_overflow not implemented for this system #endif +#endif #endif return 1; } -- GitLab