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:
12
C/exec.c
12
C/exec.c
@@ -747,7 +747,17 @@ p_execute_nonstop(void)
|
||||
return CallPredicate(RepPredProp(pe), B, RepPredProp(pe)->cs.p_code.TrueCodeOfPred);
|
||||
} else if ((RepPredProp(pe)->PredFlags & (AsmPredFlag|CPredFlag)) &&
|
||||
RepPredProp(pe)->OpcodeOfPred != Yap_opcode(_call_bfunc_xx)) {
|
||||
return RepPredProp(pe)->cs.f_code();
|
||||
/* 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();
|
||||
}
|
||||
} else {
|
||||
return CallPredicate(RepPredProp(pe), B, RepPredProp(pe)->CodeOfPred);
|
||||
}
|
||||
|
Reference in New Issue
Block a user