ifixes to support 64 bits:
- protect registers before calling prune() - use Int, not int.
This commit is contained in:
parent
cd028bbd3f
commit
a40987b70d
14
C/absmi.c
14
C/absmi.c
@ -2204,7 +2204,9 @@ Yap_absmi(int inp)
|
||||
SET_ASP(YREG, PREG->u.s.s);
|
||||
PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l);
|
||||
/* assume cut is always in stack */
|
||||
saveregs();
|
||||
prune((choiceptr)YREG[E_CB]);
|
||||
setregs();
|
||||
GONext();
|
||||
ENDOp();
|
||||
|
||||
@ -2221,7 +2223,9 @@ Yap_absmi(int inp)
|
||||
#endif
|
||||
SET_ASP(YREG, PREG->u.s.s);
|
||||
/* assume cut is always in stack */
|
||||
saveregs();
|
||||
prune((choiceptr)YREG[E_CB]);
|
||||
setregs();
|
||||
PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l);
|
||||
#ifdef FROZEN_STACKS
|
||||
{
|
||||
@ -2255,7 +2259,9 @@ Yap_absmi(int inp)
|
||||
#endif
|
||||
SET_ASP(YREG, PREG->u.s.s);
|
||||
PREG = NEXTOP(NEXTOP(NEXTOP(PREG, s),Osbpp),l);
|
||||
saveregs();
|
||||
prune((choiceptr)SREG[E_CB]);
|
||||
setregs();
|
||||
GONext();
|
||||
ENDOp();
|
||||
|
||||
@ -2306,7 +2312,9 @@ Yap_absmi(int inp)
|
||||
#else
|
||||
pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0));
|
||||
#endif /* SBA && FROZEN_STACKS */
|
||||
saveregs();
|
||||
prune(pt0);
|
||||
setregs();
|
||||
}
|
||||
GONext();
|
||||
|
||||
@ -2340,7 +2348,9 @@ Yap_absmi(int inp)
|
||||
#else
|
||||
pt0 = (choiceptr)(LCL0-IntegerOfTerm(d0));
|
||||
#endif
|
||||
saveregs();
|
||||
prune(pt0);
|
||||
setregs();
|
||||
}
|
||||
GONext();
|
||||
|
||||
@ -14059,7 +14069,9 @@ Yap_absmi(int inp)
|
||||
if (at == AtomCut) {
|
||||
choiceptr cut_pt = (choiceptr)pt0[E_CB];
|
||||
SET_ASP(YREG, E_CB*sizeof(CELL));
|
||||
saveregs();
|
||||
prune(cut_pt);
|
||||
setregs();
|
||||
}
|
||||
pen = RepPredProp(PredPropByAtom(at, mod));
|
||||
goto execute_comma;
|
||||
@ -14137,7 +14149,9 @@ Yap_absmi(int inp)
|
||||
} else if ((Atom)(pen->FunctorOfPred) == AtomCut) {
|
||||
choiceptr cut_pt = (choiceptr)pt0[E_CB];
|
||||
SET_ASP(YREG, E_CB*sizeof(CELL));
|
||||
saveregs();
|
||||
prune(cut_pt);
|
||||
setregs();
|
||||
}
|
||||
|
||||
execute_after_comma:
|
||||
|
@ -848,7 +848,7 @@ p_read (void)
|
||||
return do_read(NULL, 6);
|
||||
}
|
||||
|
||||
extern int getInputStream(int, IOSTREAM **);
|
||||
extern int getInputStream(Int, IOSTREAM **);
|
||||
|
||||
static Int
|
||||
p_read2 (void)
|
||||
|
@ -1569,7 +1569,7 @@ prune(choiceptr cp)
|
||||
#ifdef YAPOR
|
||||
CUT_prune_to(cp);
|
||||
#endif /* YAPOR */
|
||||
/* cut ! */
|
||||
/* cut ! */
|
||||
#ifdef TABLING
|
||||
abolish_incomplete_subgoals(B);
|
||||
#endif /* TABLING */
|
||||
|
@ -47,12 +47,10 @@
|
||||
if (erase) {
|
||||
/* at this point, we are the only ones accessing the clause,
|
||||
hence we don't need to have a lock it */
|
||||
saveregs();
|
||||
if (cl->ClFlags & ErasedMask)
|
||||
Yap_ErLogUpdIndex(cl);
|
||||
else
|
||||
Yap_CleanUpIndex(cl);
|
||||
setregs();
|
||||
}
|
||||
UNLOCK(ap->PELock);
|
||||
} else {
|
||||
|
@ -2799,7 +2799,7 @@ Yap_CloseStreams(int loud)
|
||||
closeFiles(FALSE);
|
||||
}
|
||||
|
||||
int Yap_StreamToFileNo(Term t) {
|
||||
Int Yap_StreamToFileNo(Term t) {
|
||||
IOSTREAM *s;
|
||||
int rc;
|
||||
|
||||
@ -2818,7 +2818,7 @@ FILE *Yap_FileDescriptorFromStream(Term t)
|
||||
fprintf(stderr,"Unimplemented\n");
|
||||
// return Sfileno(s);
|
||||
}
|
||||
return -1;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
|
Reference in New Issue
Block a user