Hi,

I think we can fix this issue by following approach.  I think a valid
fix would be the following. We might want to add a call to _fpreset()
in __dyn_tls_init() before the last for-loop (see  tlssup.c in
mingw-w64-crt/crt/

Kai

2016-03-02 16:51 GMT+01:00 Alberto Luaces <alua...@udc.es>:
> "Burkhardt, Glenn" writes:
>
>> You're probably running into the fact that Intel processors have
>> floating point registers with 80 bits, and when optimization is turned
>> on, operations are done in registers and not truncated as they are
>> when the values are stored to memory.
>>
>> See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323  Notice the number of 
>> duplicated reports - it's a surprise to a lot of people.
>>
>> There are ways to set the precision used by the FPU, e.g.,
>>
>> #include "fpu_control.h"
>>
>>     fpu_control_t cw;
>>     _FPU_GETCW(cw);
>>     cw &= ~_FPU_EXTENDED;
>>     cw |= _FPU_DOUBLE;
>>     _FPU_SETCW(cw);
>
> Aren't those settings only useful int 32-bit code?[1]  It could matter
> depending if the OP's code is compiled in 64 or 32 bits.
>
>
> Footnotes:
> [1]  
> https://stackoverflow.com/questions/22710272/difference-in-floating-point-arithmetics-between-x86-and-x64
>
> --
> Alberto
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to