https://issues.dlang.org/show_bug.cgi?id=21376
--- Comment #2 from Iain Buclaw <[email protected]> --- Assembly dump of return statement in `float abs()` ----------------------------------------------------- dmd x86: call hypotFeeZe add $0x8,%esp leave ret $0x8 ----------------------------------------------------- dmd x86_64: callq hypotFeeZe add $0x20,%rsp fstpl -0x20(%rbp) movsd -0x20(%rbp),%xmm0 cvtsd2ss %xmm0,%xmm0 leaveq retq ----------------------------------------------------- gdc x86: call hypotFeeZe add $0x18,%esp fstps -0x4(%ebp) flds -0x4(%ebp) leave ret ----------------------------------------------------- gdc x86_64: callq hypotFeeZe add $0x20,%rsp fstps -0xc(%rbp) movss -0xc(%rbp),%xmm0 leaveq retq ----------------------------------------------------- As expected, there is no fstp/fld generated by dmd x86, so the real value returned by hypot is not truncated as per what x86_64 does. --
