don't use a cached version of ARG1 in choice-points

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1161 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2004-10-14 22:14:53 +00:00
parent 8eb4718654
commit ac9770bdf3
3 changed files with 19 additions and 16 deletions

View File

@ -10,8 +10,11 @@
* *
* File: absmi.c *
* comments: Portable abstract machine interpreter *
* Last rev: $Date: 2004-09-30 21:37:40 $,$Author: vsc $ *
* Last rev: $Date: 2004-10-14 22:14:52 $,$Author: vsc $ *
* $Log: not supported by cvs2svn $
* Revision 1.148 2004/09/30 21:37:40 vsc
* fixes for thread support
*
* Revision 1.147 2004/09/30 19:51:53 vsc
* fix overflow from within clause/2
*
@ -890,7 +893,7 @@ Yap_absmi(int inp)
check_trail(TR);
CACHE_Y(YREG);
{
register CELL x1 = CACHED_A1();
register CELL x1 = ARG1;
store_yaam_regs(PREG->u.ld.d, 1);
B_YREG->cp_a1 = x1;
@ -958,12 +961,12 @@ Yap_absmi(int inp)
CACHE_Y(YREG);
#ifdef HAVE_FEW_REGS
store_yaam_regs(PREG->u.ld.d, 2);
B_YREG->cp_a1 = CACHED_A1();
B_YREG->cp_a1 = ARG1;
B_YREG->cp_a2 = ARG2;
#else
{
register CELL x2 = ARG2;
register CELL x1 = CACHED_A1();
register CELL x1 = ARG1;
store_yaam_regs(PREG->u.ld.d, 2);
B_YREG->cp_a1 = x1;
@ -1036,12 +1039,12 @@ Yap_absmi(int inp)
CACHE_Y(YREG);
#ifdef HAVE_FEW_REGS
store_yaam_regs(PREG->u.ld.d, 3);
B_YREG->cp_a1 = CACHED_A1();
B_YREG->cp_a1 = ARG1;
B_YREG->cp_a2 = ARG2;
B_YREG->cp_a3 = ARG3;
#else
{
register CELL x1 = CACHED_A1();
register CELL x1 = ARG1;
register CELL x2 = ARG2;
register CELL x3 = ARG3;
@ -1120,13 +1123,13 @@ Yap_absmi(int inp)
CACHE_Y(YREG);
store_yaam_regs(PREG->u.ld.d, 4);
#ifdef HAVE_FEW_REGS
B_YREG->cp_a1 = CACHED_A1();
B_YREG->cp_a1 = ARG1;
B_YREG->cp_a2 = ARG2;
B_YREG->cp_a3 = ARG3;
B_YREG->cp_a4 = ARG4;
#else
{
register CELL x1 = CACHED_A1();
register CELL x1 = ARG1;
register CELL x2 = ARG2;
register CELL x3 = ARG3;
register CELL x4 = ARG4;
@ -7336,7 +7339,7 @@ Yap_absmi(int inp)
/* Point AP to the code that follows this instruction */
{
register CELL x2 = ARG2;
register CELL x1 = CACHED_A1();
register CELL x1 = ARG1;
store_yaam_regs(NEXTOP(PREG, l), 2);
B_YREG->cp_a1 = x1;
@ -7359,7 +7362,7 @@ Yap_absmi(int inp)
/* Point AP to the code that follows this instruction */
{
store_yaam_regs(NEXTOP(PREG, l), 3);
B_YREG->cp_a1 = CACHED_A1();
B_YREG->cp_a1 = ARG1;
B_YREG->cp_a2 = ARG2;
B_YREG->cp_a3 = ARG3;
}
@ -7380,7 +7383,7 @@ Yap_absmi(int inp)
/* Point AP to the code that follows this instruction */
{
store_yaam_regs(NEXTOP(PREG, l), 4);
B_YREG->cp_a1 = CACHED_A1();
B_YREG->cp_a1 = ARG1;
B_YREG->cp_a2 = ARG2;
B_YREG->cp_a3 = ARG3;
B_YREG->cp_a4 = ARG4;

View File

@ -1995,12 +1995,12 @@ p_alarm(void)
left = alarm(IntegerOfTerm(t));
tout = MkIntegerTerm(left);
return(Yap_unify(ARG2,tout));
return Yap_unify(ARG2,tout);
}
#else
/* not actually trying to set the alarm */
if (IntegerOfTerm(t) == 0)
return(TRUE);
return TRUE;
Yap_Error(SYSTEM_ERROR, TermNil,
"alarm not available in this configuration");
return(FALSE);

View File

@ -10,7 +10,7 @@
* File: Yap.h.m4 *
* mods: *
* comments: main header file for YAP *
* version: $Id: Yap.h.m4,v 1.71 2004-10-08 17:20:03 vsc Exp $ *
* version: $Id: Yap.h.m4,v 1.72 2004-10-14 22:14:53 vsc Exp $ *
*************************************************************************/
#include "config.h"
@ -682,7 +682,7 @@ and RefOfTerm(t) : Term -> DBRef = ...
#if IN_SECOND_QUADRANT
#define INVERT_RBIT 1 /* RBIT is 1 by default */
#endif
#endif !GC_NO_TAGS
#endif /* !GC_NO_TAGS */
#else
@ -693,7 +693,7 @@ and RefOfTerm(t) : Term -> DBRef = ...
#define RBIT /* 0x20000000 */ MKTAG(0x1,0) /* relocation chain bit */
#define MBIT /* 0x40000000 */ MKTAG(0x2,0) /* mark bit */
#endif
#endif !GC_NO_TAGS
#endif /* !GC_NO_TAGS */
#endif