ldc-developers / ldc

The LLVM-based D Compiler.
http://wiki.dlang.org/LDC
Other
1.21k stars 261 forks source link

Fix and re-enable core.internal.convert unit tests #788

Closed dnadlinger closed 8 years ago

dnadlinger commented 9 years ago

See #770.

smolt commented 9 years ago

I suppose the internal/convert.d unittest fix should go upstream first. Tested on X86 and ARM.

        // don't test pad bytes because can be anything    
        enum testsize =
            (FloatTraits!TYPE.EXPONENT + FloatTraits!TYPE.MANTISSA + 1)/8;
        assert(rtbytes[0..testsize] == ctbytes[0..testsize]);
smolt commented 9 years ago

https://github.com/D-Programming-Language/druntime/pull/1297

smolt commented 9 years ago

If questioning if fixing test is right thing, note that clang doesn't zero pad x87 long doubles either. The last 6-bytes are whatever happens to already be in memory. Makes sense because eliminates extra instructions needed to zero bytes that don't have any affect on long double computations.

dnadlinger commented 8 years ago

1241 merged.