fix interface bug with external c-code.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1893 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
b1d0de4266
commit
85f82a22d4
10
C/exec.c
10
C/exec.c
@ -747,7 +747,17 @@ p_execute_nonstop(void)
|
|||||||
return CallPredicate(RepPredProp(pe), B, RepPredProp(pe)->cs.p_code.TrueCodeOfPred);
|
return CallPredicate(RepPredProp(pe), B, RepPredProp(pe)->cs.p_code.TrueCodeOfPred);
|
||||||
} else if ((RepPredProp(pe)->PredFlags & (AsmPredFlag|CPredFlag)) &&
|
} else if ((RepPredProp(pe)->PredFlags & (AsmPredFlag|CPredFlag)) &&
|
||||||
RepPredProp(pe)->OpcodeOfPred != Yap_opcode(_call_bfunc_xx)) {
|
RepPredProp(pe)->OpcodeOfPred != Yap_opcode(_call_bfunc_xx)) {
|
||||||
|
/* USER C-Code may walk over registers */
|
||||||
|
if (RepPredProp(pe)->PredFlags & UserCPredFlag) {
|
||||||
|
save_machine_regs();
|
||||||
|
}
|
||||||
|
if (RepPredProp(pe)->PredFlags & UserCPredFlag) {
|
||||||
|
Int out = RepPredProp(pe)->cs.f_code();
|
||||||
|
restore_machine_regs();
|
||||||
|
return out;
|
||||||
|
} else {
|
||||||
return RepPredProp(pe)->cs.f_code();
|
return RepPredProp(pe)->cs.f_code();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
return CallPredicate(RepPredProp(pe), B, RepPredProp(pe)->CodeOfPred);
|
return CallPredicate(RepPredProp(pe), B, RepPredProp(pe)->CodeOfPred);
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
<h2>Yap-5.1.2:</h2>
|
<h2>Yap-5.1.2:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li> FIXED: bug in meta-calls to external C code (obs from Bernd Gutmann).</li>
|
||||||
<li> NEW: matlab interface.</li>
|
<li> NEW: matlab interface.</li>
|
||||||
<li> FIXED: search for libraries right.</li>
|
<li> FIXED: search for libraries right.</li>
|
||||||
<li> FIXED: alarm used alarm(2) but it should use setitimer(2) so that
|
<li> FIXED: alarm used alarm(2) but it should use setitimer(2) so that
|
||||||
|
Reference in New Issue
Block a user