Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
This commit is contained in:
commit
dd182fdeac
67
H/Regs.h
67
H/Regs.h
@ -31,12 +31,12 @@
|
||||
#undef PUSH_X
|
||||
#endif
|
||||
|
||||
#ifdef __x86_64__
|
||||
#undef PUSH_REGS
|
||||
#ifdef sparc
|
||||
#define PUSH_REGS 1
|
||||
#undef PUSH_X
|
||||
#endif
|
||||
|
||||
#if defined(sparc) || defined(__sparc)
|
||||
#ifdef __x86_64__
|
||||
#undef PUSH_REGS
|
||||
#undef PUSH_X
|
||||
#endif
|
||||
@ -202,66 +202,7 @@ extern int Yap_stack_overflows;
|
||||
#define YENV_ADDRESS (&(YENV))
|
||||
#define MEM2YENV
|
||||
|
||||
#if defined(__GNUC__) && defined(sparc) && !defined(__NetBSD__) && !defined(THREADS)
|
||||
|
||||
#define P Yap_REGS.P_ /* prolog machine program counter */
|
||||
#define YENV Yap_REGS.YENV_ /* current environment (may differ from ENV)*/
|
||||
#define S Yap_REGS.S_ /* structure pointer */
|
||||
|
||||
register CELL *H asm ("g5");
|
||||
#define TR Yap_REGS.TR_ /* latest choice point */
|
||||
#define B Yap_REGS.B_ /* latest choice point */
|
||||
#define CP Yap_REGS.CP_ /* continuation program counter */
|
||||
#define HB Yap_REGS.HB_ /* heap (global) stack top at time of latest c.p. */
|
||||
#define CreepFlag Yap_REGS.CreepFlag_
|
||||
|
||||
EXTERN inline void save_machine_regs(void) {
|
||||
Yap_REGS.H_ = H;
|
||||
}
|
||||
|
||||
EXTERN inline void restore_machine_regs(void) {
|
||||
H = Yap_REGS.H_;
|
||||
}
|
||||
|
||||
#define BACKUP_MACHINE_REGS() \
|
||||
CELL *BK_H = H; \
|
||||
restore_machine_regs()
|
||||
|
||||
#define RECOVER_MACHINE_REGS() \
|
||||
save_machine_regs(); \
|
||||
H = BK_H
|
||||
|
||||
EXTERN inline void save_H(void) {
|
||||
Yap_REGS.H_ = H;
|
||||
}
|
||||
|
||||
EXTERN inline void restore_H(void) {
|
||||
H = Yap_REGS.H_;
|
||||
}
|
||||
|
||||
#define BACKUP_H() CELL *BK_H = H; restore_H()
|
||||
|
||||
#define RECOVER_H() save_H(); H = BK_H
|
||||
|
||||
EXTERN inline void save_B(void) {
|
||||
}
|
||||
|
||||
EXTERN inline void restore_B(void) {
|
||||
}
|
||||
|
||||
#if defined(__svr4__)
|
||||
#define BACKUP_B()
|
||||
|
||||
#define RECOVER_B()
|
||||
#else
|
||||
#define BACKUP_B()
|
||||
|
||||
#define RECOVER_B()
|
||||
#endif
|
||||
|
||||
#define restore_TR()
|
||||
|
||||
#elif defined(__GNUC__) && defined(__alpha)
|
||||
#if defined(__GNUC__) && defined(__alpha)
|
||||
|
||||
#define P Yap_REGS.P_ /* prolog machine program counter */
|
||||
#define YENV Yap_REGS.YENV_ /* current environment (may differ from ENV) */
|
||||
|
20
H/absmi.h
20
H/absmi.h
@ -36,16 +36,6 @@ static char SccsId[] = "%W% %G%";
|
||||
*/
|
||||
#ifdef __GNUC__
|
||||
|
||||
#if defined(sparc) || defined(__sparc)
|
||||
#define SHADOW_P 1
|
||||
#define SHADOW_Y 1
|
||||
#define SHADOW_S 1
|
||||
#define SHADOW_REGS 1
|
||||
#define SHADOW_CP 1
|
||||
#define SHADOW_HB 1
|
||||
#define USE_PREFETCH 1
|
||||
#endif
|
||||
|
||||
#ifdef hppa
|
||||
#define SHADOW_P 1
|
||||
#define SHADOW_Y 1
|
||||
@ -91,6 +81,16 @@ register struct yami* P1REG asm ("bp"); /* can't use yamop before Yap.h */
|
||||
#endif /* BP_FREE */
|
||||
#endif /* i386 */
|
||||
|
||||
#ifdef sparc
|
||||
#define SHADOW_P 1
|
||||
#ifdef BP_FREE
|
||||
#undef BP_FREE
|
||||
#endif
|
||||
#define S_IN_MEM 1
|
||||
#define Y_IN_MEM 1
|
||||
#define TR_IN_MEM 1
|
||||
#endif /* sparc_ */
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define SHADOW_P 1
|
||||
#ifdef BP_FREE
|
||||
|
@ -165,7 +165,7 @@ extern YP_FILE yp_iob[YP_MAX_FILES];
|
||||
|
||||
typedef YP_FILE *YP_File;
|
||||
|
||||
enum TokenKinds {
|
||||
typedef enum TokenKinds {
|
||||
Name_tok,
|
||||
Number_tok,
|
||||
Var_tok,
|
||||
@ -174,16 +174,16 @@ enum TokenKinds {
|
||||
Ponctuation_tok,
|
||||
Error_tok,
|
||||
eot_tok
|
||||
};
|
||||
} tkinds;
|
||||
|
||||
typedef struct TOKEN {
|
||||
unsigned char Tok;
|
||||
enum TokenKinds Tok;
|
||||
Term TokInfo;
|
||||
int TokPos;
|
||||
struct TOKEN *TokNext;
|
||||
} TokEntry;
|
||||
|
||||
#define Ord(X) ((int) (X))
|
||||
#define Ord(X) ((enum TokenKinds) (X))
|
||||
|
||||
#define NextToken GNextToken()
|
||||
|
||||
|
Reference in New Issue
Block a user