fix register recovery after ^c on Macs
fix 64 bit complaints. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1542 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
bc82175e5e
commit
46f90fc6aa
@ -1581,6 +1581,7 @@ p_integer(Term t E_ARGS)
|
||||
#ifdef USE_GMP
|
||||
MP_INT *new = TMP_BIG();
|
||||
|
||||
fprintf(stderr,"dbl is %g\n",dbl);
|
||||
mpz_init_set_d(new, dbl);
|
||||
RBIG(new);
|
||||
#else
|
||||
|
10
C/exec.c
10
C/exec.c
@ -1239,16 +1239,12 @@ exec_absmi(int top)
|
||||
/* otherwise, SetDBForThrow will fail entering critical mode */
|
||||
Yap_PrologMode = UserMode;
|
||||
/* find out where to cut to */
|
||||
#if defined(__GNUC__)
|
||||
#if defined(hppa) || defined(__alpha)
|
||||
/* siglongjmp resets the TR hardware register */
|
||||
/* TR and B are crucial, they might have been changed, or not */
|
||||
restore_TR();
|
||||
#endif
|
||||
#if defined(__alpha)
|
||||
/* siglongjmp resets the H hardware register */
|
||||
restore_B();
|
||||
/* H is not so important, because we're gonna backtrack */
|
||||
restore_H();
|
||||
#endif
|
||||
#endif
|
||||
yap_flags[SPY_CREEP_FLAG] = 0;
|
||||
LOCK(SignalLock);
|
||||
CreepFlag = CalculateStackGap();
|
||||
|
17
H/Regs.h
17
H/Regs.h
@ -10,7 +10,7 @@
|
||||
* File: Regs.h *
|
||||
* mods: *
|
||||
* comments: YAP abstract machine registers *
|
||||
* version: $Id: Regs.h,v 1.35 2006-02-01 13:28:56 vsc Exp $ *
|
||||
* version: $Id: Regs.h,v 1.36 2006-02-13 16:58:55 vsc Exp $ *
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
@ -445,6 +445,8 @@ EXTERN inline void restore_B(void) {
|
||||
|
||||
#define RECOVER_B() save_B(); B = BK_B
|
||||
|
||||
#define restore_TR()
|
||||
|
||||
#elif defined(__GNUC__) && defined(hppa)
|
||||
|
||||
#define P Yap_REGS.P_ /* prolog machine program counter */
|
||||
@ -627,6 +629,17 @@ EXTERN inline void restore_B(void) {
|
||||
|
||||
#define RECOVER_B() save_B(); B = BK_B
|
||||
|
||||
EXTERN void restore_TR(void);
|
||||
EXTERN void save_TR(void);
|
||||
|
||||
EXTERN inline void save_TR(void) {
|
||||
Yap_REGS.TR_ = TR;
|
||||
}
|
||||
|
||||
EXTERN inline void restore_TR(void) {
|
||||
TR = Yap_REGS.TR_;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define CP Yap_REGS.CP_ /* continuation program counter */
|
||||
@ -669,6 +682,8 @@ EXTERN inline void restore_B(void) {
|
||||
|
||||
#define RECOVER_B()
|
||||
|
||||
#define restore_TR()
|
||||
|
||||
#endif
|
||||
|
||||
#define AuxSp Yap_REGS.AuxSp_
|
||||
|
@ -16,8 +16,9 @@
|
||||
|
||||
<h2>Yap-5.1.0:</h2>
|
||||
<ul>
|
||||
<li> FIXED: handle heap overflow from huge atoms in
|
||||
Yap_LookupAtom/scanner (Nuno Fonseca).</li>
|
||||
<li> FIXED: ^c should take care about TR and B.</li>
|
||||
<li> FIXED: don't pass a pointer to a mpz_t. (Nuno Fonseca)</li>
|
||||
<li> FIXED: handle heap overflow from huge atoms in Yap_LookupAtom/scanner (Nuno Fonseca).</li>
|
||||
<li> FIXED: bignum was using int where should be long int (Roberto Bagnara).</li>
|
||||
<li> NEW: x86_64 should have registers, right? First cut at using them.</li>
|
||||
<li> FIXED: call_n would break under 64 bits, an int problem.</li>
|
||||
@ -26,8 +27,7 @@ Yap_LookupAtom/scanner (Nuno Fonseca).</li>
|
||||
<li> FIXED: ok, MkBigInt shouldn't free the bigint.</li>
|
||||
<li> FIXED: MkBigInt already frees bigint.</li>
|
||||
<li> FIXED: don't pass a pointer to a mpz_t. (Nuno Fonseca)</li>
|
||||
<li> FIXED: YENV may be an HW register ('d break some tabling code)
|
||||
(Remko Troncon) </li>
|
||||
<li> FIXED: YENV may be an HW register (could break some tabling code) (Remko Troncon) </li>
|
||||
<li> FIXED: All YAAM instructions are now brackedted, so Op introduced an { and EndOp intr
|
||||
oduces an }. This is because Ricardo assumes that. </li>
|
||||
<li> FIXED: compile attvars when COROUTING is undefined. </li>
|
||||
|
@ -86,7 +86,7 @@ static int p_open_trie(void) {
|
||||
|
||||
/* open trie */
|
||||
node = open_trie();
|
||||
if (!YAP_Unify(arg_trie, YAP_MkIntTerm((int) node)))
|
||||
if (!YAP_Unify(arg_trie, YAP_MkIntTerm((YAP_Int) node)))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
@ -136,7 +136,7 @@ static int p_put_trie_entry(void) {
|
||||
|
||||
/* put trie entry */
|
||||
node = put_trie_entry((TrNode) YAP_IntOfTerm(arg_trie), arg_entry, mode);
|
||||
if (!YAP_Unify(arg_ref, YAP_MkIntTerm((int) node)))
|
||||
if (!YAP_Unify(arg_ref, YAP_MkIntTerm((YAP_Int) node)))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user