about summary refs log tree commit diff
path: root/src/test/incremental/thinlto
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2017-07-03 16:16:45 +0200
committerest31 <MTest31@outlook.com>2017-07-03 21:51:36 +0200
commit3ba0f07f08516c365bc33615e162f83ab182f0b5 (patch)
tree56ab120cd778d2c73ec3e066adb0712be9d86052 /src/test/incremental/thinlto
parent1d2db7b9e8082f0459e000985d77fc7ad0dabade (diff)
downloadrust-3ba0f07f08516c365bc33615e162f83ab182f0b5.tar.gz
rust-3ba0f07f08516c365bc33615e162f83ab182f0b5.zip
Make sNaN removal code tolerate different sNaN encodings
IEEE 754-1985 specifies the encoding of NaN floating point numbers,
but while it mentions that NaNs can be subdivided into signaling
and quiet ones, it doesn't fix the encoding of signaling NaNs in binary
formats. This led to different implementations (CPUs) having different
encodings. IEEE 754-2008 finally specified the encoding of signaling NaNs
but some architectures are compatible with it, while others aren't.
Certain MIPS and PA-RISC CPUs have different encodings for signaling
NaNs.

In order to have the float <-> binary cast feature of the std library be
portable to them, we don't mask any quiet NaNs like we did before (only
being compliant to IEEE 754-2008 and nothing else), but instead we
simply pass a known good NaN instead.

Note that in the code removed there was a bug; the 64 bit mask for quiet
NaNs should have been `0x0008000000000000` instead of the specified
`0x0001000000000000`.
Diffstat (limited to 'src/test/incremental/thinlto')
0 files changed, 0 insertions, 0 deletions