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

A couple simple fixes to compile a lisp executable

parent 6f995199
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
* GENCGC support by Douglas Crosher, 1996, 1997.
* Alpha support by Julian Dolby, 1999.
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.17 2004/05/19 22:37:40 cwang Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/Linux-os.c,v 1.18 2004/05/20 00:32:24 cwang Exp $
*
*/
......@@ -231,7 +231,11 @@ void sigsegv_handler(HANDLER_ARGS)
{
GET_CONTEXT
#if (LINUX_VERSION_CODE >= linuxversion(2,1,0)) || (__GNU_LIBRARY__ >= 6)
int fault_addr = ((struct sigcontext *) (&contextstruct))->cr2;
#else
int fault_addr = ((struct sigcontext_struct *) (&contextstruct))->cr2;
#endif
int page_index = find_page_index((void *) fault_addr);
#ifdef RED_ZONE_HIT
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.35 2004/05/19 22:28:43 cwang Exp $ */
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/interrupt.c,v 1.36 2004/05/20 00:32:24 cwang Exp $ */
/* Interrupt handing magic. */
......@@ -661,6 +661,11 @@ interrupt_handle_space_overflow(lispobj error, struct sigcontext *context)
/* ECX is the argument count. */
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
build_fake_control_stack_frame (context);
/* This part should be common to all non-x86 ports */
......@@ -672,6 +677,7 @@ interrupt_handle_space_overflow(lispobj error, struct sigcontext *context)
/* This is sparc specific */
SC_REG(context, reg_CODE) = ((long) PTR(error)) + type_FunctionPointer;
#endif
#endif
}
void interrupt_init(void)
......
/*
* main() entry point for a stand alone lisp image.
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.39 2004/05/19 22:42:53 cwang Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.40 2004/05/20 00:32:25 cwang Exp $
*
*/
......@@ -577,7 +577,7 @@ int main(int argc, char *argv[], char *envp[])
if(builtin_image_flag != 0) {
extern int image_dynamic_space_size;
long allocation_pointer = (long) dynamic_0_space + (int)&image_dynamic_space_size;
#ifdef i386
#if defined(i386) || defined(__x86_64)
SetSymbolValue(ALLOCATION_POINTER, (lispobj)allocation_pointer);
#else
current_dynamic_space_free_pointer = (lispobj*)allocation_pointer;
......
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