00001 /* File: register.h 00002 ** Author(s): Warren, Swift, Xu, Sagonas 00003 ** Contact: xsb-contact@cs.sunysb.edu 00004 ** 00005 ** Copyright (C) The Research Foundation of SUNY, 1986, 1993-1998 00006 ** 00007 ** XSB is free software; you can redistribute it and/or modify it under the 00008 ** terms of the GNU Library General Public License as published by the Free 00009 ** Software Foundation; either version 2 of the License, or (at your option) 00010 ** any later version. 00011 ** 00012 ** XSB is distributed in the hope that it will be useful, but WITHOUT ANY 00013 ** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00014 ** FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for 00015 ** more details. 00016 ** 00017 ** You should have received a copy of the GNU Library General Public License 00018 ** along with XSB; if not, write to the Free Software Foundation, 00019 ** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 ** 00021 ** $Id: register.h,v 1.9 2005/07/07 16:55:52 dwarren Exp $ 00022 ** 00023 */ 00024 00025 #ifndef __REGISTER_H__ 00026 #define __REGISTER_H__ 00027 00028 #include "psc_xsb.h" 00029 #include "varstring_xsb.h" 00030 00031 #ifndef MULTI_THREAD 00032 00033 /* Argument Registers 00034 ------------------ */ 00035 #define MAX_REGS 257 00036 extern Cell reg[MAX_REGS]; 00037 00038 /*---- special registers -----------------------------------------------*/ 00039 00040 extern CPtr ereg; /* last activation record */ 00041 extern CPtr breg; /* last choice point */ 00042 extern CPtr hreg; /* top of heap */ 00043 extern CPtr *trreg; /* top of trail stack */ 00044 extern CPtr hbreg; /* heap back track point */ 00045 extern CPtr sreg; /* current build or unify field */ 00046 extern byte *cpreg; /* return point register */ 00047 extern byte *pcreg; /* program counter */ 00048 00049 #ifdef CP_DEBUG 00050 extern Psc pscreg; 00051 #endif 00052 /*---- registers added for the SLG-WAM ---------------------------------*/ 00053 00054 extern CPtr efreg; 00055 extern CPtr bfreg; 00056 extern CPtr hfreg; 00057 extern CPtr *trfreg; 00058 extern CPtr pdlreg; 00059 extern CPtr openreg; 00060 00061 extern CPtr ptcpreg; /* parent tabled CP (subgoal) */ 00062 extern CPtr delayreg; 00063 extern CPtr interrupt_reg; 00064 00065 /*---- registers added for demand support ------------------------------*/ 00066 #ifdef DEMAND 00067 /* demand-freeze registers */ 00068 extern CPtr edfreg; 00069 extern CPtr bdfreg; 00070 extern CPtr hdfreg; 00071 extern CPtr *trdfreg; 00072 #endif 00073 00074 /*---- global thread-specific char buffers for local builtins ----------*/ 00075 extern VarString *tsgLBuff1; 00076 extern VarString *tsgLBuff2; 00077 extern VarString *tsgSBuff1; 00078 extern VarString *tsgSBuff2; 00079 00080 /*---- other stuff added for the SLG-WAM -------------------------------*/ 00081 00082 extern int xwammode; 00083 extern int level_num; 00084 extern CPtr root_address; 00085 00086 /*---- for splitting stack mode ----------------------------------------*/ 00087 00088 extern CPtr ebreg; /* breg into environment stack */ 00089 00090 #endif 00091 00092 00093 #endif /* __REGISTER_H__ */