Related articles |
---|
Re: Q: P6 branch prediction conway@rimmer.cs.mu.OZ.AU (1996-05-01) |
Re: Q: P6 branch prediction khays@sequent.com (1996-05-14) |
Re: Using memory below the SP (Was: Q: P6 branch prediction) zalman@macromedia.com (1996-05-18) |
Re: Using memory above TOS bart@time.cirl.uoregon.edu (1996-05-19) |
Using memory above TOS fjh@cs.mu.OZ.AU (Fergus Henderson) (1996-05-21) |
Re: Using memory above TOS jeremy@floyd.sw.oz.au (1996-05-21) |
Re: Using memory above TOS markt@harlequin.co.uk (1996-05-29) |
Re: Using memory above TOS markt@harlequin.co.uk (1996-05-29) |
From: | Fergus Henderson <fjh@cs.mu.OZ.AU> |
Newsgroups: | comp.compilers |
Date: | 21 May 1996 16:15:15 -0400 |
Organization: | Compilers Central |
References: | <3179B05D.2781@cs.princeton.edu> 96-05-012 96-05-100 96-05-105 96-05-132 |
Keywords: | architecture |
bart@time.cirl.uoregon.edu (Barton C. Massey) writes:
| Thomas Charles CONWAY <conway@rimmer.cs.mu.OZ.AU> wrote that
| the Mercury compiler uses an optimization that depends on a
| word above TOS (the Top Of the Stack) not being munged.
[...]
| IMHO this isn't very "safe".
[...]
| For a language like Mercury, in which there's an explicit
| runtime system and signal handlers are not directly implemented
| by the user, optimizations which use memory above TOS may be
| acceptable.
The reason that the optimization is safe in Mercury is that the Mercury
compiler generates code which uses its own stack rather than the C
stack. Since we're using our own stack, we're free to do what we
please with it, without any danger of interference from the OS.
Indeed, it is possibly misleading to say that signal handlers are not
directly implemented by the user in Mercury. Although Mercury doesn't
have any direct support for signal handlers, is in fact possible for
Mercury code to install signal handlers using the C interface.
--
Fergus Henderson <fjh@cs.mu.oz.au>
WWW: <http://www.cs.mu.oz.au/~fjh>
PGP: finger fjh@128.250.37.3
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.