small look at compilation.

This commit is contained in:
Vítor Santos Costa 2011-10-02 19:55:22 -03:00
parent c8061d46d6
commit 66ae65fe09
5 changed files with 18 additions and 19 deletions

View File

@ -1544,7 +1544,7 @@ Yap_absmi(int inp)
} }
#endif #endif
PREG = NEXTOP(PREG, L); PREG = NEXTOP(PREG, L);
GONext(); JMPNext();
ENDBOp(); ENDBOp();
/* copy database term */ /* copy database term */
@ -1618,7 +1618,7 @@ Yap_absmi(int inp)
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
DEPTH = YREG[E_DEPTH]; DEPTH = YREG[E_DEPTH];
#endif #endif
GONext(); JMPNext();
ENDBOp(); ENDBOp();
@ -1670,7 +1670,7 @@ Yap_absmi(int inp)
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
DEPTH = YREG[E_DEPTH]; DEPTH = YREG[E_DEPTH];
#endif #endif
GONext(); JMPNext();
ENDBOp(); ENDBOp();
@ -2023,7 +2023,7 @@ Yap_absmi(int inp)
#endif /* LOW_LEVEL_TRACER */ #endif /* LOW_LEVEL_TRACER */
#ifdef FROZEN_STACKS #ifdef FROZEN_STACKS
#ifdef YAPOR_SBA #ifdef YAPOR_SBA
if (pt0 < TR_FZ || pt0 > CurrentTrailTop) if (pt0 < TR_FZ || pt0 > CurrentTrailTop+MinTrailGap)
#else #else
if (pt0 < TR_FZ) if (pt0 < TR_FZ)
#endif /* YAPOR_SBA */ #endif /* YAPOR_SBA */
@ -2073,7 +2073,7 @@ Yap_absmi(int inp)
#ifdef YAPOR_SBA #ifdef YAPOR_SBA
(ADDR) pt1 >= HeapTop (ADDR) pt1 >= HeapTop
#else #else
IN_BETWEEN(LOCAL_TrailBase, pt1, CurrentTrailTop) IN_BETWEEN(LOCAL_TrailBase, pt1, CurrentTrailTop+MinTrailGap)
#endif /* YAPOR_SBA */ #endif /* YAPOR_SBA */
) )
{ {
@ -2646,7 +2646,7 @@ Yap_absmi(int inp)
!(LOCAL_ActiveSignals & ~YAP_CREEP_SIGNAL)) || !(LOCAL_ActiveSignals & ~YAP_CREEP_SIGNAL)) ||
(PREG->opc != Yap_opcode(_procceed) && (PREG->opc != Yap_opcode(_procceed) &&
PREG->opc != Yap_opcode(_cut_e))) { PREG->opc != Yap_opcode(_cut_e))) {
GONext(); JMPNext();
} }
PP = PREVOP(PREG,p)->u.p.p; PP = PREVOP(PREG,p)->u.p.p;
ASP = YREG+E_CB; ASP = YREG+E_CB;
@ -7902,7 +7902,7 @@ Yap_absmi(int inp)
} }
#endif #endif
} }
GONext(); JMPNext();
ENDBOp(); ENDBOp();
BOp(try_logical, OtaLl); BOp(try_logical, OtaLl);
@ -8559,7 +8559,7 @@ Yap_absmi(int inp)
} }
PREG = NEXTOP(PREG, aFlp); PREG = NEXTOP(PREG, aFlp);
GONext(); JMPNext();
ENDBOp(); ENDBOp();

View File

@ -1630,7 +1630,7 @@ Yap_InitYaamRegs(void)
H = H0 = ((CELL *) LOCAL_GlobalBase)+ Yap_AttsSize/sizeof(CELL); H = H0 = ((CELL *) LOCAL_GlobalBase)+ Yap_AttsSize/sizeof(CELL);
RESET_VARIABLE(H0-1); RESET_VARIABLE(H0-1);
LCL0 = ASP = (CELL *) LOCAL_LocalBase; LCL0 = ASP = (CELL *) LOCAL_LocalBase;
CurrentTrailTop = (tr_fr_ptr)LOCAL_TrailTop; CurrentTrailTop = (tr_fr_ptr)(LOCAL_TrailTop-MinTrailGap);
/* notice that an initial choice-point and environment /* notice that an initial choice-point and environment
*must* be created since for the garbage collector to work */ *must* be created since for the garbage collector to work */
B = NULL; B = NULL;

View File

@ -125,7 +125,7 @@ SetHeapRegs(int copying_threads USES_REGS)
/* Adjust stack addresses */ /* Adjust stack addresses */
LOCAL_TrailBase = TrailAddrAdjust(LOCAL_TrailBase); LOCAL_TrailBase = TrailAddrAdjust(LOCAL_TrailBase);
LOCAL_TrailTop = TrailAddrAdjust(LOCAL_TrailTop); LOCAL_TrailTop = TrailAddrAdjust(LOCAL_TrailTop);
CurrentTrailTop = (tr_fr_ptr)LOCAL_TrailTop; CurrentTrailTop = (tr_fr_ptr)(LOCAL_TrailTop-MinTrailGap);
if (LOCAL_GDiff) { if (LOCAL_GDiff) {
/* make sure we are not just expanding the delay stack */ /* make sure we are not just expanding the delay stack */
LOCAL_GlobalBase = BaseAddrAdjust(LOCAL_GlobalBase); LOCAL_GlobalBase = BaseAddrAdjust(LOCAL_GlobalBase);
@ -1851,7 +1851,7 @@ Yap_CopyThreadStacks(int worker_q, int worker_p, int incremental)
LOCAL_LocalBase = REMOTE_LocalBase(worker_p); LOCAL_LocalBase = REMOTE_LocalBase(worker_p);
LOCAL_TrailBase = REMOTE_TrailBase(worker_p); LOCAL_TrailBase = REMOTE_TrailBase(worker_p);
LOCAL_TrailTop = REMOTE_TrailTop(worker_p); LOCAL_TrailTop = REMOTE_TrailTop(worker_p);
CurrentTrailTop = (tr_fr_ptr)LOCAL_TrailTop; CurrentTrailTop = (tr_fr_ptr)(LOCAL_TrailTop-MinTrailGap);
size = REMOTE_ThreadHandle(worker_q).stack_address-REMOTE_ThreadHandle(worker_p).stack_address; size = REMOTE_ThreadHandle(worker_q).stack_address-REMOTE_ThreadHandle(worker_p).stack_address;
LOCAL_TrDiff = LOCAL_LDiff = LOCAL_GDiff = LOCAL_GDiff0 = LOCAL_DelayDiff = LOCAL_BaseDiff = size; LOCAL_TrDiff = LOCAL_LDiff = LOCAL_GDiff = LOCAL_GDiff0 = LOCAL_DelayDiff = LOCAL_BaseDiff = size;
LOCAL_XDiff = LOCAL_HDiff = 0; LOCAL_XDiff = LOCAL_HDiff = 0;

View File

@ -37,7 +37,7 @@
#endif #endif
#ifdef __x86_64__ #ifdef __x86_64__
#undef PUSH_REGS #define PUSH_REGS 1
#undef PUSH_X #undef PUSH_X
#endif #endif

View File

@ -96,13 +96,12 @@ register struct yami* P1REG asm ("bp"); /* can't use yamop before Yap.h */
#ifdef BP_FREE #ifdef BP_FREE
#undef BP_FREE #undef BP_FREE
#endif #endif
#define SHADOW_REGS 1
#define SHADOW_S 1 #define SHADOW_S 1
//#define SHADOW_Y 1 //#define SHADOW_Y 1
#define S_IN_MEM 1 #define S_IN_MEM 1
#define Y_IN_MEM 1 #define Y_IN_MEM 1
#define TR_IN_MEM 1 #define TR_IN_MEM 1
#define USE_PREFETCH 1 #define LIMITED_PREFETCH 1
#endif /* __x86_64__ */ #endif /* __x86_64__ */
#else /* other compilers */ #else /* other compilers */
@ -361,7 +360,7 @@ restore_absmi_regs(REGSTORE * old_regs)
#define DO_PREFETCH_W(TYPE) to_go = (void *)(NEXTOP(PREG,TYPE)->u.o.opcw) #define DO_PREFETCH_W(TYPE) to_go = (void *)(NEXTOP(PREG,TYPE)->u.o.opcw)
#if LIMITED_PREFETCH #if LIMITED_PREFETCH||USE_PREFETCH
#define ALWAYS_START_PREFETCH(TYPE) \ #define ALWAYS_START_PREFETCH(TYPE) \
{ register void *to_go; DO_PREFETCH(TYPE) { register void *to_go; DO_PREFETCH(TYPE)
@ -448,7 +447,7 @@ restore_absmi_regs(REGSTORE * old_regs)
#define JMPNextW() \ #define JMPNextW() \
JMP((void *)(PREG->u.o.opcw)) JMP((void *)(PREG->u.o.opcw))
#if USE_THREADED_CODE && LIMITED_PREFETCH #if USE_THREADED_CODE && (LIMITED_PREFETCH || USE_PREFETCH)
#define ALWAYS_GONext() JMP(to_go) #define ALWAYS_GONext() JMP(to_go)
@ -682,10 +681,10 @@ Macros to check the limits of stacks
#else #else
#define check_trail(x) if (Unsigned(CurrentTrailTop) - Unsigned(x) < MinTrailGap) \ #define check_trail(x) if (Unsigned(CurrentTrailTop) > Unsigned(x)) \
goto notrailleft goto notrailleft
#define check_trail_in_indexing(x) if (Unsigned(CurrentTrailTop) - Unsigned(x) < MinTrailGap) \ #define check_trail_in_indexing(x) if (Unsigned(CurrentTrailTop) < Unsigned(x)) \
goto notrailleft_from_index goto notrailleft_from_index
#endif #endif
@ -725,7 +724,7 @@ Macros to check the limits of stacks
#define store_at_least_one_arg(arity) \ #define store_at_least_one_arg(arity) \
BEGP(pt0); \ BEGP(pt0); \
pt0 = XREGS+(arity); \ pt0 = XREGS+(arity); \
do { register CELL x = pt0[0]; \ do { CELL x = pt0[0]; \
S_YREG = (S_YREG)-1; \ S_YREG = (S_YREG)-1; \
--pt0; \ --pt0; \
(S_YREG)[0] = x; \ (S_YREG)[0] = x; \