TC++: "floating point formats not linked"

Doug Gwyn gwyn at smoke.brl.mil
Wed Feb 27 07:10:34 AEST 1991


In article <1991Feb26.085503.14893 at athena.mit.edu> scs at adam.mit.edu writes:
>(Either my compiler is derived from the one Doug worked on after
>all, or his mods would have arranged for a fltused in this last
>case as well, which couldn't hurt.)

The latter, to accommodate subtle cases that could cause problems.

Another thing I did, which so far as I know was unique to my variant
of Ritchie's compiler, was to arrange that upon entry to a function
that made any use of floating point (again relying on the "fltused"
flag), after the stack pointer was adjusted to allow room for autos,
I output a "TST (SP)" instruction.  The point of this was to force
a segmentation violation at that point, in cases where the stack had
just been grown past the current maximum size, rather than later
when a floating-point instruction might have triggered the
segmentation violation trap.  This was necessary on the PDP-11/34,
which did not maintain enough state information to be able to
successfully restart all floating-point instructions that could have
caused such a trap.  (Basically I had borrowed the PDP-11/45 UNIX
instruction restart code and asynchronous floating-point processor
support and folded it into the PDP-11/40 UNIX kernel.  There were
some subtle 11/40 vs. 11/34 differences that had to be addressed
also.)



More information about the Comp.lang.c mailing list