CALL STORE()

David Hough sun!Eng!dgh
Mon Jun 11 13:26:49 PDT 1990


Even this is problematic; interprocedural optimization is a
possible wave of the future (it's good for whetstone and
dhrystone if nothing else) that could eliminate the
intended effect of CALL STORE.

What you'd like compilers to do is observe source-language
assignment statements so that X = Y + Z forces rounding
to X's precision, while X = W * (Y + Z) leaves the intermediate
Y + Z in extended.   Many compilers don't distinguish
these two cases very well.

One global approach that Kahan has suggested in the past is
"destructive store" which rounds the register value to storage
format and stores the rounded value to the destination address
as well.  That wouldn't cost anything on a typical CISC extended-precision
implementation.

On a RISC system the round to storage format
and the store would be separate instructions in any event.



More information about the Numeric-interest mailing list