fix PRISM xompiltaion in 32 bits

This commit is contained in:
vsc 2013-09-04 05:05:01 -05:00
parent 6ab396ee85
commit c21b5bef3c
4 changed files with 23 additions and 26 deletions

View File

@ -218,10 +218,22 @@ CpFloatUnaligned(CELL *ptr)
#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT
INLINE_ONLY inline EXTERN void AlignGlobalForDouble( USES_REGS1 );
#define DOUBLE_ALIGNED(ADDR) ((CELL)(ADDR) & 0x4)
INLINE_ONLY EXTERN inline void
AlignGlobalForDouble( USES_REGS1 );
INLINE_ONLY EXTERN inline void
AlignGlobalForDouble( USES_REGS1 )
{
/* Force Alignment for floats. Note that garbage collector may
break the alignment; */
if (!DOUBLE_ALIGNED(H)) {
RESET_VARIABLE(H);
H++;
}
}
#ifdef i386
INLINE_ONLY inline EXTERN Float
CpFloatUnaligned (CELL * ptr)

11
H/Yap.h
View File

@ -844,12 +844,6 @@ extern struct worker_local Yap_local;
#include "dlocals.h"
/*************************************************************************************************
unification support
*************************************************************************************************/
#include "YapCompoundTerm.h"
/*************************************************************************************************
unification routines
*************************************************************************************************/
@ -861,6 +855,11 @@ extern struct worker_local Yap_local;
#include "amiops.h"
#endif /* YAPOR_SBA */
/*************************************************************************************************
unification support
*************************************************************************************************/
#include "YapCompoundTerm.h"

View File

@ -165,6 +165,8 @@ VarOfTerm (Term t)
#ifdef YAPOR_SBA
#define RESET_VARIABLE(V) (*(CELL *)(V) = 0)
INLINE_ONLY inline EXTERN Term MkVarTerm__ ( USES_REGS1 );
INLINE_ONLY inline EXTERN Term
@ -186,6 +188,8 @@ IsUnboundVar (Term * t)
#else
#define RESET_VARIABLE(V) (*(CELL *)(V) = Unsigned(V))
INLINE_ONLY inline EXTERN Term MkVarTerm__ ( USES_REGS1 );
INLINE_ONLY inline EXTERN Term

View File

@ -100,24 +100,6 @@ A contains the address of the variable that is to be trailed
#define RESET_VARIABLE(V) (*(CELL *)(V) = Unsigned(V))
#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT
INLINE_ONLY EXTERN inline void
AlignGlobalForDouble( USES_REGS1 );
INLINE_ONLY EXTERN inline void
AlignGlobalForDouble( USES_REGS1 )
{
/* Force Alignment for floats. Note that garbage collector may
break the alignment; */
if (!DOUBLE_ALIGNED(H)) {
RESET_VARIABLE(H);
H++;
}
}
#endif
#ifdef TABLING
#define DO_TRAIL(TERM, VAL) \