[ub] P1407R0: Tell Programmers About Signed Integer Overflow Behavior

Hubert Tong hubert.reinterpretcast at gmail.com
Wed Jan 30 22:05:53 CET 2019


On Wed, Jan 30, 2019 at 2:08 PM Scott Schurr <s.scott.schurr at gmail.com>
wrote:

> Thanks for pointing that out.  Yes, saturation might be considered a
> desirable behavior, and I believe it's fairly common for floating point.  I
> haven't personally seen hardware- or language-level saturation implemented
> anywhere for integers.  The three Analog Devices DSPs that I have used in
> the past did not support saturation for integer operations.  But that
> doesn't say anything about TI, Motorola, or other DSP vendors.  So integer
> saturation might be out there in the wild.  If anyone is aware of a
> documented case, that would be great to know about.
>
vadd[us][bhw]s on POWER (vector add saturate for various widths of
(un)signed integers) is saturating. VADD for ARM NEON has a saturating form
and supported integer types.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.open-std.org/pipermail/ub/attachments/20190130/afef6f13/attachment.html 


More information about the ub mailing list