From a18e3790d0256cdf81e7d9e91f0bba95dca51b1f Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 27 Jun 2001 17:24:27 +0000 Subject: [PATCH] make sure I restore H and TR before I do SetDBForThrow git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@110 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/exec.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/C/exec.c b/C/exec.c index 253292c68..ffcaa91f5 100644 --- a/C/exec.c +++ b/C/exec.c @@ -857,6 +857,16 @@ exec_absmi(int top) /* otherwise, SetDBForThrow will fail entering critical mode */ PrologMode = UserMode; /* find out where to cut to */ +#if defined(__GNUC__) +#if defined(hppa) || defined(__alpha) + /* siglongjmp resets the TR hardware register */ + restore_TR(); +#endif +#if defined(__alpha) + /* siglongjmp resets the H hardware register */ + restore_H(); +#endif +#endif depth = SetDBForThrow(MkAtomTerm(LookupAtom("abort"))); if (depth == 0) { Error(SYSTEM_ERROR, TermNil, "database entry for throw corrupted"); @@ -870,16 +880,6 @@ exec_absmi(int top) #endif yap_flags[SPY_CREEP_FLAG] = 0; CreepFlag = CalculateStackGap(); -#if defined(__GNUC__) -#if defined(hppa) || defined(__alpha) - /* siglongjmp resets the TR hardware register */ - restore_TR(); -#endif -#if defined(__alpha) - /* siglongjmp resets the H hardware register */ - restore_H(); -#endif -#endif P = (yamop *)FAILCODE; } if (lval == 2) { /* arithmetic exception */