diff options
author | dim <dim@FreeBSD.org> | 2016-02-06 13:39:20 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2016-02-06 13:39:20 +0000 |
commit | 9c27ec33f2c82fe6c60c9c375a88f96a1e10a6a2 (patch) | |
tree | 4efb8604227ede935238eb1c67b626da1265d459 /contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc | |
parent | aef1771e36f9842a113b9905d0d5926fe9d694aa (diff) | |
parent | 75958af7df18c2ae942829da1a8cf3b5bbcaeff6 (diff) | |
download | FreeBSD-src-9c27ec33f2c82fe6c60c9c375a88f96a1e10a6a2.zip FreeBSD-src-9c27ec33f2c82fe6c60c9c375a88f96a1e10a6a2.tar.gz |
Merge compiler-rt release_38 branch r258968.
Note that there is still a problem on amd64, causing SIGBUS in the early
startup of Address Sanitizer. This is being investigated.
Diffstat (limited to 'contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc')
-rw-r--r-- | contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc b/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc index 5fefab0..d68ccf2 100644 --- a/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc +++ b/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc @@ -14,7 +14,7 @@ #include "fp_lib.h" -static inline fixuint_t __fixuint(fp_t a) { +static __inline fixuint_t __fixuint(fp_t a) { // Break a into sign, exponent, significand const rep_t aRep = toRep(a); const rep_t aAbs = aRep & absMask; @@ -27,7 +27,7 @@ static inline fixuint_t __fixuint(fp_t a) { return 0; // If the value is too large for the integer type, saturate. - if ((unsigned)exponent > sizeof(fixuint_t) * CHAR_BIT) + if ((unsigned)exponent >= sizeof(fixuint_t) * CHAR_BIT) return ~(fixuint_t)0; // If 0 <= exponent < significandBits, right shift to get the result. |