mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +03:00
Don't depend on host real_t.init, use LLVM's signalling NaN instead
This commit is contained in:
parent
f63166cf35
commit
f17ff5efe0
3 changed files with 23 additions and 3 deletions
|
@ -55,6 +55,13 @@ void Target::_init() {
|
|||
const auto IEEEquad = &APFloat::IEEEquad;
|
||||
#endif
|
||||
|
||||
RealProperties.nan =
|
||||
CTFloat::fromAPFloat(APFloat::getQNaN(*targetRealSemantics));
|
||||
RealProperties.snan =
|
||||
CTFloat::fromAPFloat(APFloat::getSNaN(*targetRealSemantics));
|
||||
RealProperties.infinity =
|
||||
CTFloat::fromAPFloat(APFloat::getInf(*targetRealSemantics));
|
||||
|
||||
if (targetRealSemantics == IEEEdouble) {
|
||||
RealProperties.max = CTFloat::parse("0x1.fffffffffffffp+1023");
|
||||
RealProperties.min_normal = CTFloat::parse("0x1p-1022");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue