cvs diff: Bug fix for SPARCs non-gc grades.
Fergus Henderson
fjh at cs.mu.oz.au
Thu Feb 6 12:53:05 AEDT 1997
Tyson Richard DOWD, you wrote:
> Estimated hours taken: 1.5
>
> Bug fix for failed tests in non-gc grades on SPARCs.
>
> Sliding register windows on the SPARC meant that registers were
> being clobbered by C function calls. This bug was foreshadowed
> by Tom, but I hadn't fixed it yet.
>
> NB: This problem needs to be documented in out C coding standard, and
> possibly the user documentation somewhere.
The C coding standard isn't quite the right place to document it.
After all, it doesn't apply to all the C code we write, just the C code
that happens to be in the Mercury runtime. The right place to document
memory allocation stuff is in heap.h, IMHO. (We could put a pointer
to this documentation in the C coding standard, though.)
> library/std_util.m:
> - Change arg, expand and functor to save_transient_registers()
> and restore_transient_registers before calling mercury_expand.
> - Change mercury_expand to use incr_saved_hp and
> incr_saved_hp_atomic.
That change is fine, except you should mention in the documentation
for mercury_expand() that you need to call save_transient_registers()
and restore_transient_registers() before/after calling mercury_expand().
Please add that little bit of documentation and then commit this change.
Thanks,
Fergus.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list