2005-05-27 23:27:59 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* *
|
|
|
|
* YAP Prolog %W% %G%
|
|
|
|
* *
|
|
|
|
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
|
|
|
* *
|
|
|
|
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
|
|
|
|
* *
|
|
|
|
**************************************************************************
|
|
|
|
* *
|
|
|
|
* File: sshift.h *
|
|
|
|
* Last rev: 19/2/88 *
|
|
|
|
* mods: *
|
|
|
|
* comments: stack shifter functionality for YAP *
|
|
|
|
* *
|
|
|
|
*************************************************************************/
|
|
|
|
|
2009-10-28 13:11:35 +00:00
|
|
|
#define REINIT_LOCK(P) INIT_LOCK(P)
|
|
|
|
#define REINIT_RWLOCK(P) INIT_RWLOCK(P)
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
#define CharP(ptr) ((char *) (ptr))
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
#define CodeAdjust(P) CodeAdjust__(P PASS_REGS)
|
|
|
|
#define PtoTRAdjust(P) PtoTRAdjust__(P PASS_REGS)
|
|
|
|
#define BaseAddrAdjust(P) BaseAddrAdjust__(P PASS_REGS)
|
|
|
|
#define CutCAdjust(P) CutCAdjust__(P PASS_REGS)
|
|
|
|
#define ChoicePtrAdjust(P) ChoicePtrAdjust__(P PASS_REGS)
|
|
|
|
#define FuncAdjust(P) FuncAdjust__(P PASS_REGS)
|
|
|
|
#define AtomTermAdjust(P) AtomTermAdjust__(P PASS_REGS)
|
|
|
|
#define TermToGlobalOrAtomAdjust(P) TermToGlobalOrAtomAdjust__(P PASS_REGS)
|
|
|
|
#define AtomAdjust(P) AtomAdjust__(P PASS_REGS)
|
|
|
|
#define IsOldCode(P) IsOldCode__(P PASS_REGS)
|
|
|
|
#define IsOldLocal(P) IsOldLocal__(P PASS_REGS)
|
|
|
|
#define IsOldLocalPtr(P) IsOldLocalPtr__(P PASS_REGS)
|
|
|
|
#define IsOldCodeCellPtr(P) IsOldCodeCellPtr__(P PASS_REGS)
|
|
|
|
#define IsOldDelay(P) IsOldDelay__(P PASS_REGS)
|
|
|
|
#define IsOldDelayPtr(P) IsOldDelayPtr__(P PASS_REGS)
|
|
|
|
#define IsOldLocalInTR(P) IsOldLocalInTR__(P PASS_REGS)
|
|
|
|
#define IsOldLocalInTRPtr(P) IsOldLocalInTRPtr__(P PASS_REGS)
|
|
|
|
#define IsOldGlobal(P) IsOldGlobal__(P PASS_REGS)
|
|
|
|
#define IsOldGlobalPtr(P) IsOldGlobalPtr__(P PASS_REGS)
|
|
|
|
#define IsOldTrail(P) IsOldTrail__(P PASS_REGS)
|
|
|
|
#define IsOldTrailPtr(P) IsOldTrailPtr__(P PASS_REGS)
|
|
|
|
#define NoAGCAtomAdjust(P) NoAGCAtomAdjust__(P PASS_REGS)
|
|
|
|
// #define OrArgAdjust(P) OrArgAdjust__(P PASS_REGS)
|
|
|
|
// #define TabEntryAdjust(P) TabEntryAdjust__(P PASS_REGS)
|
|
|
|
// #define IntegerAdjust(D) IntegerAdjust__(P PASS_REGS)
|
|
|
|
#define AddrAdjust(P) AddrAdjust__(P PASS_REGS)
|
|
|
|
#define BlockAdjust(P) BlockAdjust__(P PASS_REGS)
|
|
|
|
#define MFileAdjust(P) MFileAdjust__(P PASS_REGS)
|
|
|
|
#define CodeVarAdjust(P) CodeVarAdjust__(P PASS_REGS)
|
|
|
|
#define ConstantAdjust(P) ConstantAdjust__(P PASS_REGS)
|
|
|
|
#define ArityAdjust(P) ArityAdjust__(P PASS_REGS)
|
|
|
|
// #define DoubleInCodeAdjust(P) DoubleInCodeAdjust__(P PASS_REGS)
|
|
|
|
// #define IntegerInCodeAdjust(P) IntegerInCodeAdjust__(P PASS_REGS)
|
|
|
|
#define OpcodeAdjust(P) OpcodeAdjust__(P PASS_REGS)
|
|
|
|
#define ModuleAdjust(P) ModuleAdjust__(P PASS_REGS)
|
|
|
|
// #define ExternalFunctionAdjust(P) ExternalFunctionAdjust__(P PASS_REGS)
|
|
|
|
#define DBRecordAdjust(P) DBRecordAdjust__(P PASS_REGS)
|
|
|
|
#define PredEntryAdjust(P) PredEntryAdjust__(P PASS_REGS)
|
|
|
|
#define ModEntryPtrAdjust(P) ModEntryPtrAdjust__(P PASS_REGS)
|
|
|
|
#define AtomEntryAdjust(P) AtomEntryAdjust__(P PASS_REGS)
|
|
|
|
#define GlobalEntryAdjust(P) GlobalEntryAdjust__(P PASS_REGS)
|
|
|
|
#define BlobTermInCodeAdjust(P) BlobTermInCodeAdjust__(P PASS_REGS)
|
|
|
|
#define CellPtoHeapAdjust(P) CellPtoHeapAdjust__(P PASS_REGS)
|
|
|
|
#define PtoAtomHashEntryAdjust(P) PtoAtomHashEntryAdjust__(P PASS_REGS)
|
|
|
|
#define CellPtoHeapCellAdjust(P) CellPtoHeapCellAdjust__(P PASS_REGS)
|
|
|
|
#define CellPtoTRAdjust(P) CellPtoTRAdjust__(P PASS_REGS)
|
|
|
|
#define CodeAddrAdjust(P) CodeAddrAdjust__(P PASS_REGS)
|
|
|
|
#define ConsultObjAdjust(P) ConsultObjAdjust__(P PASS_REGS)
|
|
|
|
#define DelayAddrAdjust(P) DelayAddrAdjust__(P PASS_REGS)
|
|
|
|
#define DelayAdjust(P) DelayAdjust__(P PASS_REGS)
|
|
|
|
#define GlobalAdjust(P) GlobalAdjust__(P PASS_REGS)
|
|
|
|
#define DBRefAdjust(P) DBRefAdjust__(P PASS_REGS)
|
|
|
|
#define DBRefPAdjust(P) DBRefPAdjust__(P PASS_REGS)
|
|
|
|
#define DBTermAdjust(P) DBTermAdjust__(P PASS_REGS)
|
|
|
|
#define LUIndexAdjust(P) LUIndexAdjust__(P PASS_REGS)
|
|
|
|
#define SIndexAdjust(P) SIndexAdjust__(P PASS_REGS)
|
|
|
|
#define LocalAddrAdjust(P) LocalAddrAdjust__(P PASS_REGS)
|
|
|
|
#define GlobalAddrAdjust(P) GlobalAddrAdjust__(P PASS_REGS)
|
|
|
|
#define OpListAdjust(P) OpListAdjust__(P PASS_REGS)
|
|
|
|
#define PtoLUCAdjust(P) PtoLUCAdjust__(P PASS_REGS)
|
|
|
|
#define PtoStCAdjust(P) PtoStCAdjust__(P PASS_REGS)
|
|
|
|
#define PtoArrayEAdjust(P) PtoArrayEAdjust__(P PASS_REGS)
|
|
|
|
#define PtoArraySAdjust(P) PtoArraySAdjust__(P PASS_REGS)
|
|
|
|
#define PtoGlobalEAdjust(P) PtoGlobalEAdjust__(P PASS_REGS)
|
|
|
|
#define PtoDelayAdjust(P) PtoDelayAdjust__(P PASS_REGS)
|
|
|
|
#define PtoGloAdjust(P) PtoGloAdjust__(P PASS_REGS)
|
|
|
|
#define PtoLocAdjust(P) PtoLocAdjust__(P PASS_REGS)
|
|
|
|
#define PtoHeapCellAdjust(P) PtoHeapCellAdjust__(P PASS_REGS)
|
|
|
|
#define TermToGlobalAdjust(P) TermToGlobalAdjust__(P PASS_REGS)
|
|
|
|
#define PtoOpAdjust(P) PtoOpAdjust__(P PASS_REGS)
|
|
|
|
#define PtoLUClauseAdjust(P) PtoLUClauseAdjust__(P PASS_REGS)
|
|
|
|
#define PtoLUIndexAdjust(P) PtoLUIndexAdjust__(P PASS_REGS)
|
|
|
|
#define PtoDBTLAdjust(P) PtoDBTLAdjust__(P PASS_REGS)
|
|
|
|
#define PtoPredAdjust(P) PtoPredAdjust__(P PASS_REGS)
|
|
|
|
#define PtoPtoPredAdjust(P) PtoPtoPredAdjust__(P PASS_REGS)
|
|
|
|
#define OpRTableAdjust(P) OpRTableAdjust__(P PASS_REGS)
|
|
|
|
#define OpEntryAdjust(P) OpEntryAdjust__(P PASS_REGS)
|
|
|
|
#define PropAdjust(P) PropAdjust__(P PASS_REGS)
|
2011-03-08 00:22:32 +00:00
|
|
|
#define BlobTypeAdjust(P) BlobTypeAdjust__(P PASS_REGS)
|
2011-03-07 16:02:55 +00:00
|
|
|
#define TrailAddrAdjust(P) TrailAddrAdjust__(P PASS_REGS)
|
|
|
|
#define XAdjust(P) XAdjust__(P PASS_REGS)
|
|
|
|
#define YAdjust(P) YAdjust__(P PASS_REGS)
|
|
|
|
#define LocalAdjust(P) LocalAdjust__(P PASS_REGS)
|
|
|
|
#define TrailAdjust(P) TrailAdjust__(P PASS_REGS)
|
|
|
|
#define HoldEntryAdjust(P) HoldEntryAdjust__(P PASS_REGS)
|
|
|
|
#define CodeCharPAdjust(P) CodeCharPAdjust__(P PASS_REGS)
|
|
|
|
#define CodeVoidPAdjust(P) CodeVoidPAdjust__(P PASS_REGS)
|
|
|
|
#define HaltHookAdjust(P) HaltHookAdjust__(P PASS_REGS)
|
|
|
|
#define TokEntryAdjust(P) TokEntryAdjust__(P PASS_REGS)
|
|
|
|
#define VarEntryAdjust(P) VarEntryAdjust__(P PASS_REGS)
|
|
|
|
#define ConsumerChoicePtrAdjust(P) ConsumerChoicePtrAdjust__(P PASS_REGS)
|
|
|
|
#define GeneratorChoicePtrAdjust(P) GeneratorChoicePtrAdjust__(P PASS_REGS)
|
|
|
|
#define IsHeapP(P) IsHeapP__(P PASS_REGS)
|
|
|
|
#define IsOldVarTableTrailPtr(P) IsOldVarTableTrailPtr__(P PASS_REGS)
|
|
|
|
#define IsOldTokenTrailPtr(P) IsOldTokenTrailPtr__(P PASS_REGS)
|
|
|
|
|
|
|
|
inline EXTERN int IsHeapP__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsHeapP__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2008-01-23 17:57:56 +00:00
|
|
|
#if USE_SYSTEM_MALLOC
|
|
|
|
return (int) ((ptr < (CELL *) Yap_GlobalBase || ptr > (CELL *) Yap_TrailTop));
|
|
|
|
#else
|
2005-05-27 23:27:59 +01:00
|
|
|
return (int) ((ptr >= (CELL *) Yap_HeapBase && ptr <= (CELL *) HeapTop));
|
2008-01-23 17:57:56 +00:00
|
|
|
#endif
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
2008-09-05 05:22:19 +01:00
|
|
|
#define OrArgAdjust(P)
|
|
|
|
#define TabEntryAdjust(P)
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
/* Adjusting cells and pointers to cells */
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL *PtoGloAdjust__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoGloAdjust__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2006-08-22 17:12:46 +01:00
|
|
|
if (ptr < GSplit) {
|
2009-03-16 17:30:13 +00:00
|
|
|
if (ptr < H0)
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + DelayDiff)));
|
|
|
|
else
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + GDiff0)));
|
2006-08-22 17:12:46 +01:00
|
|
|
} else {
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + GDiff)));
|
|
|
|
}
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL *PtoDelayAdjust__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoDelayAdjust__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2008-11-14 14:54:25 +00:00
|
|
|
if (!GSplit || ptr < GSplit)
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + DelayDiff)));
|
|
|
|
else
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + GDiff0)));
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL *PtoBaseAdjust__ (CELL * CACHE_TYPE);
|
2009-03-16 17:30:13 +00:00
|
|
|
|
|
|
|
inline EXTERN CELL *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoBaseAdjust__ (CELL * ptr USES_REGS)
|
2009-03-16 17:30:13 +00:00
|
|
|
{
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + BaseDiff)));
|
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN tr_fr_ptr PtoTRAdjust__ (tr_fr_ptr CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN tr_fr_ptr
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoTRAdjust__ (tr_fr_ptr ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (tr_fr_ptr) (((tr_fr_ptr) (CharP (ptr) + TrDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL *CellPtoTRAdjust__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL *
|
2011-03-07 16:02:55 +00:00
|
|
|
CellPtoTRAdjust__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + TrDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL *PtoLocAdjust__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoLocAdjust__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + LDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct cut_c_str *CutCAdjust__ (struct cut_c_str * CACHE_TYPE);
|
2010-01-28 15:42:49 +00:00
|
|
|
|
|
|
|
inline EXTERN struct cut_c_str *
|
2011-03-07 16:02:55 +00:00
|
|
|
CutCAdjust__ (struct cut_c_str * ptr USES_REGS)
|
2010-01-28 15:42:49 +00:00
|
|
|
{
|
|
|
|
return (struct cut_c_str *) (CharP (ptr) + LDiff);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN choiceptr ChoicePtrAdjust__ (choiceptr CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN choiceptr
|
2011-03-07 16:02:55 +00:00
|
|
|
ChoicePtrAdjust__ (choiceptr ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (choiceptr) (((choiceptr) (CharP (ptr) + LDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef TABLING
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN choiceptr ConsumerChoicePtrAdjust__ (choiceptr CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN choiceptr
|
2011-03-07 16:02:55 +00:00
|
|
|
ConsumerChoicePtrAdjust__ (choiceptr ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (choiceptr) (((choiceptr) (CharP (ptr) + LDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN choiceptr GeneratorChoicePtrAdjust__ (choiceptr CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN choiceptr
|
2011-03-07 16:02:55 +00:00
|
|
|
GeneratorChoicePtrAdjust__ (choiceptr ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (choiceptr) (((choiceptr) (CharP (ptr) + LDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* TABLING */
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL GlobalAdjust__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL
|
2011-03-07 16:02:55 +00:00
|
|
|
GlobalAdjust__ (CELL val USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2006-08-22 17:12:46 +01:00
|
|
|
if ((CELL *)val < GSplit) {
|
2009-03-16 17:30:13 +00:00
|
|
|
if ((CELL *)val < H0)
|
|
|
|
return (CELL) (val + DelayDiff);
|
|
|
|
else
|
|
|
|
return (CELL) (val + GDiff0);
|
2006-08-22 17:12:46 +01:00
|
|
|
} else {
|
2009-02-26 23:06:27 +00:00
|
|
|
return (CELL) (val + GDiff);
|
2006-08-22 17:12:46 +01:00
|
|
|
}
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL DelayAdjust__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL
|
2011-03-07 16:02:55 +00:00
|
|
|
DelayAdjust__ (CELL val USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2008-11-14 14:54:25 +00:00
|
|
|
if (!GSplit || (CELL *)val < GSplit)
|
|
|
|
return (CELL) (val + DelayDiff);
|
|
|
|
else
|
|
|
|
return (CELL) (val + GDiff0);
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN ADDR GlobalAddrAdjust__ (ADDR CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN ADDR
|
2011-03-07 16:02:55 +00:00
|
|
|
GlobalAddrAdjust__ (ADDR ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2006-08-22 17:12:46 +01:00
|
|
|
if ((CELL *)ptr < GSplit) {
|
2009-03-16 17:30:13 +00:00
|
|
|
if ((CELL *)ptr < H0)
|
|
|
|
return (ADDR) (ptr + DelayDiff);
|
|
|
|
else
|
|
|
|
return (ADDR) ((ptr + GDiff0));
|
2006-08-22 17:12:46 +01:00
|
|
|
} else {
|
|
|
|
return (ADDR) ((ptr + GDiff));
|
|
|
|
}
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-08-29 17:27:11 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN ADDR DelayAddrAdjust__ (ADDR CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN ADDR
|
2011-03-07 16:02:55 +00:00
|
|
|
DelayAddrAdjust__ (ADDR ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2008-11-14 14:54:25 +00:00
|
|
|
if (!GSplit || (CELL *)ptr < GSplit)
|
|
|
|
return (ADDR) ((ptr + DelayDiff));
|
|
|
|
else
|
|
|
|
return (ADDR) ((ptr + GDiff0));
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN ADDR BaseAddrAdjust__ (ADDR CACHE_TYPE);
|
2009-03-16 17:30:13 +00:00
|
|
|
|
|
|
|
inline EXTERN ADDR
|
2011-03-07 16:02:55 +00:00
|
|
|
BaseAddrAdjust__ (ADDR ptr USES_REGS)
|
2009-03-16 17:30:13 +00:00
|
|
|
{
|
|
|
|
return (ADDR) ((ptr + BaseDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL LocalAdjust__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL
|
2011-03-07 16:02:55 +00:00
|
|
|
LocalAdjust__ (CELL val USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (CELL) ((val + LDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN ADDR LocalAddrAdjust__ (ADDR CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN ADDR
|
2011-03-07 16:02:55 +00:00
|
|
|
LocalAddrAdjust__ (ADDR ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (ADDR) ((ptr + LDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL TrailAdjust__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL
|
2011-03-07 16:02:55 +00:00
|
|
|
TrailAdjust__ (CELL val USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (CELL) ((val + TrDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN ADDR TrailAddrAdjust__ (ADDR CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN ADDR
|
2011-03-07 16:02:55 +00:00
|
|
|
TrailAddrAdjust__ (ADDR ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (ADDR) ((ptr + TrDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN TokEntry *TokEntryAdjust__ (TokEntry * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN TokEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
TokEntryAdjust__ (TokEntry * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (TokEntry *) (((CELL) ptr + TrDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN VarEntry *VarEntryAdjust__ (VarEntry * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN VarEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
VarEntryAdjust__ (VarEntry * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (VarEntry *) (((CELL) ptr + TrDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* heap data structures */
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Functor FuncAdjust__ (Functor CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Functor
|
2011-03-07 16:02:55 +00:00
|
|
|
FuncAdjust__ (Functor f USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2005-05-30 04:26:37 +01:00
|
|
|
if (!IsExtensionFunctor(f))
|
2005-07-06 16:10:18 +01:00
|
|
|
return (Functor) ((CharP (f) + HDiff));
|
|
|
|
return f;
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL *CellPtoHeapAdjust__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL *
|
2011-03-07 16:02:55 +00:00
|
|
|
CellPtoHeapAdjust__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2008-08-29 17:27:11 +01:00
|
|
|
if (!ptr)
|
|
|
|
return ptr;
|
2005-05-27 23:27:59 +01:00
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN HoldEntry *HoldEntryAdjust__ (HoldEntry * CACHE_TYPE);
|
2007-12-05 12:17:25 +00:00
|
|
|
|
|
|
|
inline EXTERN HoldEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
HoldEntryAdjust__ (HoldEntry * ptr USES_REGS)
|
2007-12-05 12:17:25 +00:00
|
|
|
{
|
|
|
|
return (HoldEntry *) (((HoldEntry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct record_list *DBRecordAdjust__ (struct record_list * CACHE_TYPE);
|
2011-01-03 03:16:29 +00:00
|
|
|
|
|
|
|
inline EXTERN struct record_list *
|
2011-03-07 16:02:55 +00:00
|
|
|
DBRecordAdjust__ (struct record_list * ptr USES_REGS)
|
2011-01-03 03:16:29 +00:00
|
|
|
{
|
|
|
|
if (!ptr)
|
|
|
|
return ptr;
|
|
|
|
return (struct record_list *) (CharP (ptr) + HDiff);
|
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
#if USE_OFFSETS
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Atom AtomAdjust__ (Atom CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Atom
|
2011-03-07 16:02:55 +00:00
|
|
|
AtomAdjust__ (Atom at USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (Atom) ((at));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Atom NoAGCAtomAdjust__ (Atom CACHE_TYPE);
|
2010-10-26 10:04:36 +01:00
|
|
|
|
|
|
|
inline EXTERN Atom
|
2011-03-07 16:02:55 +00:00
|
|
|
NoAGCAtomAdjust__ (Atom at USES_REGS)
|
2010-10-26 10:04:36 +01:00
|
|
|
{
|
|
|
|
return (Atom) ((at));
|
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Prop PropAdjust__ (Prop CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Prop
|
2011-03-07 16:02:55 +00:00
|
|
|
PropAdjust__ (Prop p USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (Prop) ((p));
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Atom AtomAdjust__ (Atom CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Atom
|
2011-03-07 16:02:55 +00:00
|
|
|
AtomAdjust__ (Atom at USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (Atom) ((at == NULL ? (at) : (Atom) (CharP (at) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Atom NoAGCAtomAdjust__ (Atom CACHE_TYPE);
|
2010-10-26 10:04:36 +01:00
|
|
|
|
|
|
|
inline EXTERN Atom
|
2011-03-07 16:02:55 +00:00
|
|
|
NoAGCAtomAdjust__ (Atom at USES_REGS)
|
2010-10-26 10:04:36 +01:00
|
|
|
{
|
|
|
|
return (Atom) ((at == NULL ? (at) : (Atom) (CharP (at) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Prop PropAdjust__ (Prop CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Prop
|
2011-03-07 16:02:55 +00:00
|
|
|
PropAdjust__ (Prop p USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (Prop) ((p == NULL ? (p) : (Prop) (CharP (p) + HDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2011-03-08 00:22:32 +00:00
|
|
|
inline EXTERN struct PL_blob_t *BlobTypeAdjust__ (struct PL_blob_t *CACHE_TYPE);
|
|
|
|
|
|
|
|
inline EXTERN struct PL_blob_t *
|
|
|
|
BlobTypeAdjust__ (struct PL_blob_t *at USES_REGS)
|
|
|
|
{
|
|
|
|
return (struct PL_blob_t *) ((at == NULL ? (at) : (struct PL_blob_t *) (CharP (at) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN PredEntry *PredEntryAdjust__ (PredEntry * CACHE_TYPE);
|
2007-09-29 00:18:17 +01:00
|
|
|
|
|
|
|
inline EXTERN PredEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
PredEntryAdjust__ (PredEntry *p USES_REGS)
|
2007-09-29 00:18:17 +01:00
|
|
|
{
|
|
|
|
return (PredEntry *) ((p == NULL ? (p) : (PredEntry *) (CharP (p) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct mod_entry *ModEntryPtrAdjust__ (struct mod_entry * CACHE_TYPE);
|
2009-10-28 13:11:35 +00:00
|
|
|
|
|
|
|
inline EXTERN struct mod_entry *
|
2011-03-07 16:02:55 +00:00
|
|
|
ModEntryPtrAdjust__ (struct mod_entry *p USES_REGS)
|
2009-10-28 13:11:35 +00:00
|
|
|
{
|
|
|
|
return (struct mod_entry *) ((p == NULL ? (p) : (struct mod_entry *) (CharP (p) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN COUNT ConstantAdjust__ (COUNT CACHE_TYPE);
|
2008-08-29 17:27:11 +01:00
|
|
|
|
|
|
|
inline EXTERN COUNT
|
2011-03-07 16:02:55 +00:00
|
|
|
ConstantAdjust__ (COUNT val USES_REGS)
|
2008-08-29 17:27:11 +01:00
|
|
|
{
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Int ArityAdjust__ (Int CACHE_TYPE);
|
2008-08-29 17:27:11 +01:00
|
|
|
|
|
|
|
inline EXTERN Int
|
2011-03-07 16:02:55 +00:00
|
|
|
ArityAdjust__ (Int val USES_REGS)
|
2008-08-29 17:27:11 +01:00
|
|
|
{
|
|
|
|
return val;
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN OPCODE OpcodeAdjust__ (OPCODE CACHE_TYPE);
|
2008-08-29 17:27:11 +01:00
|
|
|
|
|
|
|
inline EXTERN OPCODE
|
2011-03-07 16:02:55 +00:00
|
|
|
OpcodeAdjust__ (OPCODE val USES_REGS)
|
2008-08-29 17:27:11 +01:00
|
|
|
{
|
|
|
|
return Yap_opcode(Yap_op_from_opcode(val));
|
|
|
|
}
|
|
|
|
|
|
|
|
#define DoubleInCodeAdjust(D)
|
|
|
|
|
|
|
|
#define IntegerInCodeAdjust(D)
|
|
|
|
|
|
|
|
#define IntegerAdjust(D) (D)
|
|
|
|
|
|
|
|
#define ExternalFunctionAdjust(D) (D);
|
2007-09-29 00:18:17 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term AtomTermAdjust__ (Term CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
AtomTermAdjust__ (Term at USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2009-11-20 00:31:09 +00:00
|
|
|
if (at == 0L)
|
|
|
|
return at;
|
2009-11-18 23:33:09 +00:00
|
|
|
return (Term)(CharP(at) + HDiff);
|
2008-05-12 15:04:23 +01:00
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term ModuleAdjust__ (Term CACHE_TYPE);
|
2008-08-29 17:27:11 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
ModuleAdjust__ (Term t USES_REGS)
|
2008-08-29 17:27:11 +01:00
|
|
|
{
|
|
|
|
return AtomTermAdjust(t);
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term CodeVarAdjust__ (Term CACHE_TYPE);
|
2008-05-12 15:04:23 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
CodeVarAdjust__ (Term var USES_REGS)
|
2008-05-12 15:04:23 +01:00
|
|
|
{
|
2009-11-20 00:31:09 +00:00
|
|
|
if (var == 0L)
|
|
|
|
return var;
|
2009-11-18 23:33:09 +00:00
|
|
|
return (Term)(CharP(var) + HDiff);
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if TAGS_FAST_OPS
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term BlobTermInCodeAdjust__ (Term CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
BlobTermInCodeAdjust__ (Term t USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2009-11-18 23:33:09 +00:00
|
|
|
return (Term) (CharP(t) - HDiff);
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term CodeComposedTermAdjust__ (Term CACHE_TYPE);
|
2008-04-01 09:42:46 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
CodeComposedTermAdjust__ (Term t USES_REGS)
|
2008-04-01 09:42:46 +01:00
|
|
|
{
|
2009-11-18 23:33:09 +00:00
|
|
|
return (Term) (CharP(t) - HDiff);
|
2008-04-01 09:42:46 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
#else
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term BlobTermInCodeAdjust__ (Term CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
BlobTermInCodeAdjust__ (Term t USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2009-11-18 23:33:09 +00:00
|
|
|
return (Term) (CharP(t) + HDiff);
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term CodeComposedTermAdjust__ (Term CACHE_TYPE);
|
2008-04-01 09:42:46 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
CodeComposedTermAdjust__ (Term t USES_REGS)
|
2008-04-01 09:42:46 +01:00
|
|
|
{
|
2009-11-18 23:33:09 +00:00
|
|
|
return (Term) (CharP(t) + HDiff);
|
2008-04-01 09:42:46 +01:00
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN AtomEntry *AtomEntryAdjust__ (AtomEntry * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN AtomEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
AtomEntryAdjust__ (AtomEntry * at USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (AtomEntry *) ((AtomEntry *) (CharP (at) + HDiff));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct mfile *MFileAdjust__ (struct mfile * CACHE_TYPE);
|
2008-04-04 10:10:02 +01:00
|
|
|
|
|
|
|
inline EXTERN struct mfile *
|
2011-03-07 16:02:55 +00:00
|
|
|
MFileAdjust__ (struct mfile * at USES_REGS)
|
2008-04-04 10:10:02 +01:00
|
|
|
{
|
|
|
|
return (struct mfile *) (CharP (at) + HDiff);
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN GlobalEntry *GlobalEntryAdjust__ (GlobalEntry * CACHE_TYPE);
|
2007-01-08 08:27:19 +00:00
|
|
|
|
|
|
|
inline EXTERN GlobalEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
GlobalEntryAdjust__ (GlobalEntry * at USES_REGS)
|
2007-01-08 08:27:19 +00:00
|
|
|
{
|
|
|
|
return (GlobalEntry *) ((GlobalEntry *) (CharP (at) + HDiff));
|
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN union CONSULT_OBJ *ConsultObjAdjust__ (union CONSULT_OBJ * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN union CONSULT_OBJ *
|
2011-03-07 16:02:55 +00:00
|
|
|
ConsultObjAdjust__ (union CONSULT_OBJ *co USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (union CONSULT_OBJ *) ((union CONSULT_OBJ *) (CharP (co) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN DBRef DBRefAdjust__ (DBRef CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN DBRef
|
2011-03-07 16:02:55 +00:00
|
|
|
DBRefAdjust__ (DBRef dbr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (DBRef) ((DBRef) (CharP (dbr) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN DBRef *DBRefPAdjust__ (DBRef * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN DBRef *
|
2011-03-07 16:02:55 +00:00
|
|
|
DBRefPAdjust__ (DBRef * dbrp USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (DBRef *) ((DBRef *) (CharP (dbrp) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN DBTerm *DBTermAdjust__ (DBTerm * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN DBTerm *
|
2011-03-07 16:02:55 +00:00
|
|
|
DBTermAdjust__ (DBTerm * dbtp USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (DBTerm *) ((DBTerm *) (CharP (dbtp) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct static_index *SIndexAdjust__ (struct static_index * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN struct static_index *
|
2011-03-07 16:02:55 +00:00
|
|
|
SIndexAdjust__ (struct static_index *si USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (struct static_index
|
|
|
|
*) ((struct static_index *) (CharP (si) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct logic_upd_index *LUIndexAdjust__ (struct logic_upd_index
|
|
|
|
* CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN struct logic_upd_index *
|
2011-03-07 16:02:55 +00:00
|
|
|
LUIndexAdjust__ (struct logic_upd_index *lui USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (struct logic_upd_index
|
|
|
|
*) ((struct logic_upd_index *) (CharP (lui) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term CodeAdjust__ (Term CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
CodeAdjust__ (Term dbr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2009-11-18 23:33:09 +00:00
|
|
|
return (Term) (CharP(dbr) + HDiff);
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN ADDR AddrAdjust__ (ADDR CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN ADDR
|
2011-03-07 16:02:55 +00:00
|
|
|
AddrAdjust__ (ADDR addr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (ADDR) ((ADDR) (CharP (addr) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CODEADDR CodeAddrAdjust__ (CODEADDR CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CODEADDR
|
2011-03-07 16:02:55 +00:00
|
|
|
CodeAddrAdjust__ (CODEADDR addr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (CODEADDR) ((CODEADDR) (CharP (addr) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN char * CodeCharPAdjust__ (char * CACHE_TYPE);
|
2005-11-23 03:01:33 +00:00
|
|
|
|
|
|
|
inline EXTERN char *
|
2011-03-07 16:02:55 +00:00
|
|
|
CodeCharPAdjust__ (char * addr USES_REGS)
|
2005-11-23 03:01:33 +00:00
|
|
|
{
|
2009-10-30 23:59:00 +00:00
|
|
|
if (!addr)
|
|
|
|
return NULL;
|
|
|
|
return addr + HDiff;
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN void * CodeVoidPAdjust__ (void * CACHE_TYPE);
|
2009-10-30 23:59:00 +00:00
|
|
|
|
|
|
|
inline EXTERN void *
|
2011-03-07 16:02:55 +00:00
|
|
|
CodeVoidPAdjust__ (void * addr USES_REGS)
|
2009-10-30 23:59:00 +00:00
|
|
|
{
|
|
|
|
if (!addr)
|
|
|
|
return NULL;
|
2005-11-23 03:01:33 +00:00
|
|
|
return addr + HDiff;
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct halt_hook *HaltHookAdjust__ (struct halt_hook * CACHE_TYPE);
|
2005-11-23 03:01:33 +00:00
|
|
|
|
2010-09-24 14:00:53 +01:00
|
|
|
inline EXTERN struct halt_hook *
|
2011-03-07 16:02:55 +00:00
|
|
|
HaltHookAdjust__ (struct halt_hook * addr USES_REGS)
|
2010-09-24 14:00:53 +01:00
|
|
|
{
|
|
|
|
if (!addr)
|
|
|
|
return NULL;
|
|
|
|
return (struct halt_hook *) (CharP (addr) + HDiff);
|
|
|
|
}
|
2005-05-27 23:27:59 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN BlockHeader *BlockAdjust__ (BlockHeader * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN BlockHeader *
|
2011-03-07 16:02:55 +00:00
|
|
|
BlockAdjust__ (BlockHeader * addr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (BlockHeader *) ((BlockHeader *) (CharP (addr) + HDiff));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN yamop *PtoOpAdjust__ (yamop * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN yamop *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoOpAdjust__ (yamop * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2011-02-04 01:41:01 +00:00
|
|
|
if (ptr)
|
|
|
|
return (yamop *) (CharP (ptr) + HDiff);
|
2011-02-12 14:14:12 +00:00
|
|
|
return ptr;
|
2006-10-10 15:08:17 +01:00
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct operator_entry *OpListAdjust__ (struct operator_entry * CACHE_TYPE);
|
2009-10-30 23:59:00 +00:00
|
|
|
|
|
|
|
inline EXTERN struct operator_entry *
|
2011-03-07 16:02:55 +00:00
|
|
|
OpListAdjust__ (struct operator_entry * ptr USES_REGS)
|
2009-10-30 23:59:00 +00:00
|
|
|
{
|
|
|
|
if (!ptr)
|
|
|
|
return ptr;
|
|
|
|
return (struct operator_entry *) (CharP (ptr) + HDiff);
|
|
|
|
}
|
|
|
|
|
2006-10-10 15:08:17 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct logic_upd_clause *PtoLUClauseAdjust__ (struct logic_upd_clause * CACHE_TYPE);
|
2006-10-10 15:08:17 +01:00
|
|
|
|
|
|
|
inline EXTERN struct logic_upd_clause *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoLUClauseAdjust__ (struct logic_upd_clause * ptr USES_REGS)
|
2006-10-10 15:08:17 +01:00
|
|
|
{
|
|
|
|
return (struct logic_upd_clause *) (CharP (ptr) + HDiff);
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct logic_upd_index *PtoLUIndexAdjust__ (struct logic_upd_index * CACHE_TYPE);
|
2006-11-27 17:42:03 +00:00
|
|
|
|
|
|
|
inline EXTERN struct logic_upd_index *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoLUIndexAdjust__ (struct logic_upd_index * ptr USES_REGS)
|
2006-11-27 17:42:03 +00:00
|
|
|
{
|
|
|
|
return (struct logic_upd_index *) (CharP (ptr) + HDiff);
|
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN CELL *PtoHeapCellAdjust__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN CELL *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoHeapCellAdjust__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (CELL *) (((CELL *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN AtomHashEntry *PtoAtomHashEntryAdjust__ (AtomHashEntry * CACHE_TYPE);
|
2008-09-18 17:59:16 +01:00
|
|
|
|
|
|
|
inline EXTERN AtomHashEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoAtomHashEntryAdjust__ (AtomHashEntry * ptr USES_REGS)
|
2008-09-18 17:59:16 +01:00
|
|
|
{
|
|
|
|
return (AtomHashEntry *) (((AtomHashEntry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term TermToGlobalAdjust__ (Term CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
2010-03-21 22:12:42 +00:00
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
TermToGlobalAdjust__ (Term t USES_REGS)
|
2010-03-21 22:12:42 +00:00
|
|
|
{
|
|
|
|
if (t == 0L)
|
|
|
|
return t;
|
|
|
|
return AbsAppl(PtoGloAdjust(RepAppl(t)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN Term TermToGlobalOrAtomAdjust__ (Term CACHE_TYPE);
|
2010-03-21 22:12:42 +00:00
|
|
|
|
|
|
|
inline EXTERN Term
|
2011-03-07 16:02:55 +00:00
|
|
|
TermToGlobalOrAtomAdjust__ (Term t USES_REGS)
|
2010-03-21 22:12:42 +00:00
|
|
|
{
|
|
|
|
if (t == 0L)
|
|
|
|
return t;
|
|
|
|
if (IsAtomTerm(t))
|
|
|
|
return AtomTermAdjust(t);
|
|
|
|
if (IsApplTerm(t))
|
|
|
|
return AbsAppl(PtoGloAdjust(RepAppl(t)));
|
|
|
|
if (IsPairTerm(t))
|
|
|
|
return AbsPair(PtoGloAdjust(RepPair(t)));
|
|
|
|
return t;
|
|
|
|
}
|
2005-05-27 23:27:59 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN opentry *OpRTableAdjust__ (opentry * CACHE_TYPE);
|
2009-10-28 13:11:35 +00:00
|
|
|
|
|
|
|
inline EXTERN opentry *
|
2011-03-07 16:02:55 +00:00
|
|
|
OpRTableAdjust__ (opentry * ptr USES_REGS)
|
2009-10-28 13:11:35 +00:00
|
|
|
{
|
|
|
|
return (opentry *) (((opentry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN OpEntry *OpEntryAdjust__ (OpEntry * CACHE_TYPE);
|
2010-03-01 17:52:42 +00:00
|
|
|
|
|
|
|
inline EXTERN OpEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
OpEntryAdjust__ (OpEntry * ptr USES_REGS)
|
2010-03-01 17:52:42 +00:00
|
|
|
{
|
|
|
|
return (OpEntry *) (((OpEntry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN PredEntry *PtoPredAdjust__ (PredEntry * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN PredEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoPredAdjust__ (PredEntry * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (PredEntry *) (((PredEntry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN PredEntry **PtoPtoPredAdjust__ (PredEntry ** CACHE_TYPE);
|
2009-10-28 13:11:35 +00:00
|
|
|
|
|
|
|
inline EXTERN PredEntry **
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoPtoPredAdjust__ (PredEntry **ptr USES_REGS)
|
2009-10-28 13:11:35 +00:00
|
|
|
{
|
|
|
|
if (!ptr)
|
|
|
|
return NULL;
|
|
|
|
return (PredEntry **) (((PredEntry **) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN ArrayEntry *PtoArrayEAdjust__ (ArrayEntry * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN ArrayEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoArrayEAdjust__ (ArrayEntry * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2010-03-21 22:12:42 +00:00
|
|
|
if (!ptr)
|
|
|
|
return NULL;
|
2005-05-27 23:27:59 +01:00
|
|
|
return (ArrayEntry *) (((ArrayEntry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN GlobalEntry *PtoGlobalEAdjust__ (GlobalEntry * CACHE_TYPE);
|
2006-08-22 17:12:46 +01:00
|
|
|
|
|
|
|
inline EXTERN GlobalEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoGlobalEAdjust__ (GlobalEntry * ptr USES_REGS)
|
2006-08-22 17:12:46 +01:00
|
|
|
{
|
2010-03-21 22:12:42 +00:00
|
|
|
if (!ptr)
|
|
|
|
return NULL;
|
2006-08-22 17:12:46 +01:00
|
|
|
return (GlobalEntry *) (((GlobalEntry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN StaticArrayEntry *PtoArraySAdjust__ (StaticArrayEntry * CACHE_TYPE);
|
2005-10-28 18:38:50 +01:00
|
|
|
|
|
|
|
inline EXTERN StaticArrayEntry *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoArraySAdjust__ (StaticArrayEntry * ptr USES_REGS)
|
2005-10-28 18:38:50 +01:00
|
|
|
{
|
2010-03-21 22:12:42 +00:00
|
|
|
if (!ptr)
|
|
|
|
return NULL;
|
2005-10-28 18:38:50 +01:00
|
|
|
return (StaticArrayEntry *) (((StaticArrayEntry *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct logic_upd_clause *PtoLUCAdjust__ (struct logic_upd_clause* CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN struct logic_upd_clause *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoLUCAdjust__ (struct logic_upd_clause *ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (struct logic_upd_clause
|
|
|
|
*) (((struct logic_upd_clause *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct static_clause *PtoStCAdjust__ (struct static_clause * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN struct static_clause *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoStCAdjust__ (struct static_clause *ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (struct static_clause
|
|
|
|
*) (((struct static_upd_clause *) (CharP (ptr) + HDiff)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN struct dbterm_list *PtoDBTLAdjust__ (struct dbterm_list * CACHE_TYPE);
|
2007-11-06 17:02:13 +00:00
|
|
|
|
|
|
|
inline EXTERN struct dbterm_list *
|
2011-03-07 16:02:55 +00:00
|
|
|
PtoDBTLAdjust__ (struct dbterm_list * addr USES_REGS)
|
2007-11-06 17:02:13 +00:00
|
|
|
{
|
|
|
|
return (struct dbterm_list *) ((ADDR) (CharP (addr) + HDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
#if PRECOMPUTE_REGADDRESS
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN wamreg XAdjust__ (wamreg CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN wamreg
|
2011-03-07 16:02:55 +00:00
|
|
|
XAdjust__ (wamreg reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (wamreg) ((wamreg) ((reg) + XDiff));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN wamreg XAdjust__ (wamreg CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN wamreg
|
2011-03-07 16:02:55 +00:00
|
|
|
XAdjust__ (wamreg reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (wamreg) ((reg));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN yslot YAdjust__ (yslot CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN yslot
|
2011-03-07 16:02:55 +00:00
|
|
|
YAdjust__ (yslot reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (yslot) ((reg));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldLocal__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldLocal__ (CELL reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldASP, reg, OldLCL0));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldLocalPtr__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldLocalPtr__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldASP, ptr, OldLCL0));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* require because the trail might contain dangling pointers */
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldLocalInTR__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldLocalInTR__ (CELL reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldH, reg, OldLCL0));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldLocalInTRPtr__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldLocalInTRPtr__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldH, ptr, OldLCL0));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldH__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldH__ (CELL reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) ((CharP (reg) == CharP (OldH)));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldGlobal__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldGlobal__ (CELL reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2006-08-22 17:12:46 +01:00
|
|
|
return (int) (IN_BETWEEN (OldGlobalBase, reg, OldH));
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldDelay__ (CELL CACHE_TYPE);
|
2009-02-26 23:06:27 +00:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldDelay__ (CELL reg USES_REGS)
|
2009-02-26 23:06:27 +00:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldGlobalBase, reg, OldH0));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-05-27 23:27:59 +01:00
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldGlobalPtr__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldGlobalPtr__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2006-08-22 17:12:46 +01:00
|
|
|
return (int) (IN_BETWEEN (OldGlobalBase, ptr, OldH));
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldTrail__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldTrail__ (CELL reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldTrailBase, reg, OldTR));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldTrailPtr__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldTrailPtr__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldTrailBase, ptr, OldTR));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldVarTableTrailPtr__ (struct VARSTRUCT * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldVarTableTrailPtr__ (struct VARSTRUCT *ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldTrailBase, ptr, OldTR));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldTokenTrailPtr__ (struct TOKEN * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldTokenTrailPtr__ (struct TOKEN *ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldTrailBase, ptr, OldTR));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldCode__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldCode__ (CELL reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
2008-01-23 17:57:56 +00:00
|
|
|
#if USE_SYSTEM_MALLOC
|
|
|
|
return reg < (CELL)OldGlobalBase || reg > (CELL)OldTrailTop;
|
|
|
|
#else
|
2005-05-27 23:27:59 +01:00
|
|
|
return (int) (IN_BETWEEN (OldHeapBase, reg, OldHeapTop));
|
2008-01-23 17:57:56 +00:00
|
|
|
#endif
|
2005-05-27 23:27:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsOldCodeCellPtr__ (CELL * CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsOldCodeCellPtr__ (CELL * ptr USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (OldHeapBase, ptr, OldHeapTop));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-07 16:02:55 +00:00
|
|
|
inline EXTERN int IsGlobal__ (CELL CACHE_TYPE);
|
2005-05-27 23:27:59 +01:00
|
|
|
|
|
|
|
inline EXTERN int
|
2011-03-07 16:02:55 +00:00
|
|
|
IsGlobal__ (CELL reg USES_REGS)
|
2005-05-27 23:27:59 +01:00
|
|
|
{
|
|
|
|
return (int) (IN_BETWEEN (Yap_GlobalBase, reg, H));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void STD_PROTO (Yap_AdjustStacksAndTrail, (void));
|
|
|
|
void STD_PROTO (Yap_AdjustRegs, (int));
|
2008-09-05 05:22:19 +01:00
|
|
|
|