Skip to content
Snippets Groups Projects
Commit 16a8b276 authored by cwang's avatar cwang
Browse files

amd64 changes

parent 501a494f
No related branches found
No related tags found
No related merge requests found
/* /*
$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 This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University, and has been placed in the public domain. Carnegie Mellon University, and has been placed in the public domain.
...@@ -319,7 +319,7 @@ os_stack_grows_down (void) ...@@ -319,7 +319,7 @@ os_stack_grows_down (void)
static void static void
guard_zones (char **yellow_start, char **red_start) guard_zones (char **yellow_start, char **red_start)
{ {
#ifdef i386 #if (defined(i386) || defined(__x86_64))
if (os_stack_grows_down ()) if (os_stack_grows_down ())
{ {
char *end = (char *) CONTROL_STACK_START; char *end = (char *) CONTROL_STACK_START;
...@@ -433,6 +433,11 @@ os_control_stack_overflow (void *fault_addr, struct sigcontext *context) ...@@ -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_eip = (int) ((struct function *) PTR (error))->code;
context->sc_ecx = 0; context->sc_ecx = 0;
#else #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 #ifdef sparc
/* This part should be common to all non-x86 ports */ /* This part should be common to all non-x86 ports */
SC_PC(context) = (long) ((struct function *) PTR (error))->code; SC_PC(context) = (long) ((struct function *) PTR (error))->code;
...@@ -445,6 +450,7 @@ os_control_stack_overflow (void *fault_addr, struct sigcontext *context) ...@@ -445,6 +450,7 @@ os_control_stack_overflow (void *fault_addr, struct sigcontext *context)
#else #else
#error os_control_stack_overflow not implemented for this system #error os_control_stack_overflow not implemented for this system
#endif #endif
#endif
#endif #endif
return 1; return 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment