diff options
author | Andy Wingo <wingo@pobox.com> | 2011-05-15 12:09:20 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-05-15 15:34:15 +0200 |
commit | 2acdd822fb2fa788eec06938415e3b0348ea815b (patch) | |
tree | 1effa36d14d4fb9a97babe5773e1fbf6869b8958 /libguile/continuations.c | |
parent | 5c838a97598051c04d35452652147f7a85d4090d (diff) | |
download | guile-2acdd822fb2fa788eec06938415e3b0348ea815b.tar.gz |
move SCM_FLUSH_REGISTER_WINDOWS to continuations.c
* libguile/continuations.c: Move SCM_FLUSH_REGISTER_WINDOWS define
here...
* libguile/__scm.h: ...from here.
Diffstat (limited to 'libguile/continuations.c')
-rw-r--r-- | libguile/continuations.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libguile/continuations.c b/libguile/continuations.c index cf8b6ac03..7e2096698 100644 --- a/libguile/continuations.c +++ b/libguile/continuations.c @@ -182,6 +182,17 @@ continuation_print (SCM obj, SCM port, scm_print_state *state SCM_UNUSED) return 1; } +/* James Clark came up with this neat one instruction fix for + * continuations on the SPARC. It flushes the register windows so + * that all the state of the process is contained in the stack. + */ + +#if defined (sparc) || defined (__sparc__) || defined (__sparc) +# define SCM_FLUSH_REGISTER_WINDOWS asm("ta 3") +#else +# define SCM_FLUSH_REGISTER_WINDOWS /* empty */ +#endif + /* this may return more than once: the first time with the escape procedure, then subsequently with SCM_UNDEFINED (the vals already having been placed on the VM stack). */ |