summaryrefslogtreecommitdiff
path: root/libguile/_scm.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-11-22 18:35:02 +0100
committerAndy Wingo <wingo@pobox.com>2013-11-22 18:44:33 +0100
commit4a1ce0169db0f767fd13e4deba17732e444e72ee (patch)
tree22658286e56c67749150109027c1228672cfeb15 /libguile/_scm.h
parent56280be9838db09465c1449cd3345e54236fbc85 (diff)
VM copes with moving FP
* libguile/_scm.h (SCM_ASYNC_TICK_WITH_GUARD_CODE): New macro. * libguile/vm-engine.c (VM_HANDLE_INTERRUPTS): Restore FP after ticking. (CACHE_FP): New macro. (CHECK_OVERFLOW): Use CACHE_FP. (BR_ARITHMETIC, RETURN_EXP, RETURN_ONE_VALUE, BINARY_INTEGER_OP): (call, return-values, subr-call, foreign-call) (resolve, define!, toplevel-box, module-box): Restore the FP from the vp where needed.
Diffstat (limited to 'libguile/_scm.h')
-rw-r--r--libguile/_scm.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/libguile/_scm.h b/libguile/_scm.h
index ee37fc389..429861233 100644
--- a/libguile/_scm.h
+++ b/libguile/_scm.h
@@ -225,25 +225,23 @@ void scm_ia64_longjmp (scm_i_jmp_buf *, int);
-#define SCM_ASYNC_TICK \
- do \
- { \
- if (SCM_UNLIKELY (SCM_I_CURRENT_THREAD->pending_asyncs)) \
- scm_async_tick (); \
- } \
- while (0)
-
-#define SCM_ASYNC_TICK_WITH_CODE(thr, stmt) \
+#define SCM_ASYNC_TICK_WITH_GUARD_CODE(thr, pre, post) \
do \
{ \
if (SCM_UNLIKELY (thr->pending_asyncs)) \
{ \
- stmt; \
+ pre; \
scm_async_tick (); \
+ post; \
} \
} \
while (0)
+#define SCM_ASYNC_TICK_WITH_CODE(thr, stmt) \
+ SCM_ASYNC_TICK_WITH_GUARD_CODE (thr, stmt, (void) 0)
+#define SCM_ASYNC_TICK \
+ SCM_ASYNC_TICK_WITH_CODE (SCM_I_CURRENT_THREAD, (void) 0)
+