On Sat, 12 Sep 2020 07:35:00 -0400, Thomas David Rivers wrote:
>
>  ADD UNSIGNED doesn't trigger the FIXED OVERFLOW exception, while
> SIGNED operations do.  Since C doesn't want FIXED OVERFLOW exceptions,
> (almost) all of the arithmetic calculations should be done with unsigned
> arithmetic in case the exception is accidently enabled in the CPU.
> 
But for ( signed __int128 ) would it be proper to use a signed add for
only the most significant part in order to set the overflow condition
properly?

"C" implementations with which I'm familiar all require that fixed
point overflow trapping be disabled by mask.  Do you know of an
exception?

I believe the Standard says that in case of an overflow with
signed operands either (I'm not sure which) the result has an
implementation-dependent value or the effect is implementation-
dependent (e.g. it might throw a signal.)  I favor strict checking,
thus signal on fixed point overflow.

For multi-precision subtract, the subtrahend must be complemented
and the least significant parts added with the CC carry forced ON
previously.  What's the best way to do that?  SPM?

Thanks,
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to