fixes for x86_64 compilation (with David Vaz).

This commit is contained in:
Vitor Santos Costa 2009-02-10 14:24:20 +00:00
parent c750dd94f1
commit fe85e92992
4 changed files with 14 additions and 4 deletions

View File

@ -2485,7 +2485,7 @@ YAP_CloseList(Term t0, Term tail)
return TRUE;
}
X_API Int
X_API int
YAP_IsAttVar(Term t)
{
t = Deref(t);

View File

@ -183,6 +183,10 @@ extern pthread_key_t Yap_yaamregs_key;
Term X[MaxTemps]; /* 29 */
#define XREGS Yap_REGS.X
yamop *ARITH_EXCEPTION_;
int isint_[MaxArithms];
Int Ints_[MaxArithms];
Float Floats_[MaxArithms];
}
REGSTORE;

View File

@ -144,6 +144,8 @@ typedef struct special_functors_struct
special_functors;
#endif
inline EXTERN Float STD_PROTO (CpFloatUnaligned, (CELL *));
#if SIZEOF_DOUBLE == SIZEOF_LONG_INT
inline EXTERN Term MkFloatTerm (Float);
@ -169,12 +171,16 @@ FloatOfTerm (Term t)
#define InitUnalignedFloat()
inline extern Float
CpFloatUnaligned(CELL *ptr)
{
return *((Float *)ptr);
}
#else
#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT
inline EXTERN Float STD_PROTO (CpFloatUnaligned, (CELL *));
inline EXTERN void STD_PROTO (AlignGlobalForDouble, (void));
#define DOUBLE_ALIGNED(ADDR) ((CELL)(ADDR) & 0x4)

View File

@ -162,7 +162,7 @@ Term STD_PROTO(Yap_eval_atom,(Int));
Term STD_PROTO(Yap_eval_unary,(Int,Term));
Term STD_PROTO(Yap_eval_binary,(Int,Term,Term));
blob_type STD_PROTO(Yap_Eval,(Term));
Term STD_PROTO(Yap_Eval,(Term));
#define RINT(v) return(MkIntegerTerm(v))
#define RFLOAT(v) return(MkFloatTerm(v))