]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask().
authorBrandon Bergren <bdragon@FreeBSD.org>
Mon, 1 Mar 2021 03:06:59 +0000 (21:06 -0600)
committerBrandon Bergren <bdragon@FreeBSD.org>
Tue, 23 Mar 2021 21:59:28 +0000 (16:59 -0500)
commita9c7d90862ef1214f5d9c4455d4519eec3a34570
tree4fb4d7a0c829c70b6c9b234da21c15551163121f
parent064f09616c6745e96321313a6bebe0872f242eac
[PowerPC] [PowerPCSPE] Fix multiple issues in fpsetmask().

Building R on powerpc64 exposed a problem in fpsetmask() whereby we
were not properly clamping the provided mask to the valid range.

This same issue affects powerpc and powerpcspe.

Properly limit the range of bits that can be set via fpsetmask().

While here, use the correct fp_except_t type instead of fp_rnd_t.

Reported by: pkubaj, jhibbits (in IRC)
Sponsored by: Tag1 Consulting, Inc.
Approved by: re (gjb) (Post-RC3 outstanding request approved for RC4)

(cherry picked from commit 384ee7cc6e9e4ddc91a6e9e623fcbbe5826bce38)
(cherry picked from commit 8b96d6ac04e7e761ec6b9eff47c801a2b89fbd6d)
lib/libc/powerpc/gen/fpsetmask.c
lib/libc/powerpcspe/gen/fpsetmask.c