Skip to content
Snippets Groups Projects
Commit af6e986e authored by wlott's avatar wlott
Browse files

Added #ifdef mips around all the mips specific stuff.

parent b7bcaf21
Branches
Tags
No related merge requests found
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/globals.c,v 1.2 1990/05/24 17:46:05 wlott Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/globals.c,v 1.3 1990/09/08 11:00:32 wlott Exp $ */
/* Variables everybody needs to look at or frob on. */ /* Variables everybody needs to look at or frob on. */
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
int foreign_function_call_active; int foreign_function_call_active;
#ifdef mips
unsigned long saved_global_pointer; unsigned long saved_global_pointer;
#endif
lispobj *current_control_stack_pointer; lispobj *current_control_stack_pointer;
lispobj *current_control_frame_pointer; lispobj *current_control_frame_pointer;
...@@ -29,8 +31,10 @@ globals_init() ...@@ -29,8 +31,10 @@ globals_init()
/* Space, stack, and free pointer vars are initialized by /* Space, stack, and free pointer vars are initialized by
validate() and coreparse(). */ validate() and coreparse(). */
#ifdef mips
/* Get the current value of GP. */ /* Get the current value of GP. */
saved_global_pointer = current_global_pointer(); saved_global_pointer = current_global_pointer();
#endif
/* Set foreign function call active. */ /* Set foreign function call active. */
foreign_function_call_active = 1; foreign_function_call_active = 1;
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/globals.h,v 1.2 1990/05/24 17:46:07 wlott Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/globals.h,v 1.3 1990/09/08 11:00:49 wlott Exp $ */
#if !defined(_INCLUDE_GLOBALS_H_) #if !defined(_INCLUDE_GLOBALS_H_)
#define _INCLUDED_GLOBALS_H_ #define _INCLUDED_GLOBALS_H_
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
extern int foreign_function_call_active; extern int foreign_function_call_active;
#ifdef mips
extern unsigned long saved_global_pointer; extern unsigned long saved_global_pointer;
#endif
extern lispobj *current_control_stack_pointer; extern lispobj *current_control_stack_pointer;
extern lispobj *current_control_frame_pointer; extern lispobj *current_control_frame_pointer;
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.7 1990/07/18 10:52:17 wlott Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.8 1990/09/08 11:00:52 wlott Exp $ */
/* Interrupt handing magic. */ /* Interrupt handing magic. */
#include <signal.h> #include <signal.h>
#ifdef mips
#include <mips/cpu.h> #include <mips/cpu.h>
#endif
#include "lisp.h" #include "lisp.h"
#include "ldb.h" #include "ldb.h"
...@@ -78,8 +80,10 @@ struct sigcontext *context; ...@@ -78,8 +80,10 @@ struct sigcontext *context;
current_control_frame_pointer[2] = current_control_frame_pointer[2] =
(lispobj)context->sc_regs[CODE]; (lispobj)context->sc_regs[CODE];
#ifdef mips
/* Restore the GP */ /* Restore the GP */
set_global_pointer(saved_global_pointer); set_global_pointer(saved_global_pointer);
#endif
/* Do dynamic binding of the active interrupt context index /* Do dynamic binding of the active interrupt context index
and save the context in the context array. */ and save the context in the context array. */
......
/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/test.c,v 1.7 1990/08/30 16:39:00 wlott Exp $ */ /* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/test.c,v 1.8 1990/09/08 10:59:34 wlott Exp $ */
/* Extra random routines for testing stuff. */ /* Extra random routines for testing stuff. */
#include <signal.h> #include <signal.h>
#ifdef mips
#include <mips/cpu.h> #include <mips/cpu.h>
#endif
#include "lisp.h" #include "lisp.h"
#include "ldb.h" #include "ldb.h"
...@@ -29,6 +31,7 @@ struct sigcontext *context; ...@@ -29,6 +31,7 @@ struct sigcontext *context;
printf("Hit with %s, code = %d, context = 0x%x\n", signames[signal], code, context); printf("Hit with %s, code = %d, context = 0x%x\n", signames[signal], code, context);
#ifdef mips
if (context->sc_cause & CAUSE_BD) if (context->sc_cause & CAUSE_BD)
ptr = (unsigned long *)(context->sc_pc + 4); ptr = (unsigned long *)(context->sc_pc + 4);
else else
...@@ -146,6 +149,7 @@ struct sigcontext *context; ...@@ -146,6 +149,7 @@ struct sigcontext *context;
break; break;
} }
} }
#endif
mask = sigsetmask(0); mask = sigsetmask(0);
...@@ -158,6 +162,7 @@ struct sigcontext *context; ...@@ -158,6 +162,7 @@ struct sigcontext *context;
#define FIXNUM_VALUE(lispobj) (((int)lispobj)>>2) #define FIXNUM_VALUE(lispobj) (((int)lispobj)>>2)
#ifdef mips
static sigfpe_handler(signal, code, context) static sigfpe_handler(signal, code, context)
int signal, code; int signal, code;
struct sigcontext *context; struct sigcontext *context;
...@@ -216,6 +221,7 @@ struct sigcontext *context; ...@@ -216,6 +221,7 @@ struct sigcontext *context;
else else
context->sc_pc += 4; context->sc_pc += 4;
} }
#endif
...@@ -249,15 +255,18 @@ test_init() ...@@ -249,15 +255,18 @@ test_init()
install_handler(SIGINT, signal_handler); install_handler(SIGINT, signal_handler);
install_handler(SIGTRAP, signal_handler); install_handler(SIGTRAP, signal_handler);
#ifdef mips
install_handler(SIGFPE, sigfpe_handler); install_handler(SIGFPE, sigfpe_handler);
#endif
} }
#ifdef mips
cacheflush() cacheflush()
{ {
/* This is supposed to be defined, but is not. */ /* This is supposed to be defined, but is not. */
} }
#endif
lispobj debug_print(string) lispobj debug_print(string)
lispobj string; lispobj string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment