SSE+O2 = floats return NaN

SSE+O2 = floats return NaN

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

SSE+O2 = floats return NaN

Post by jK »

Current svn crashs for me with optimize=2 and fpmath=sse.
One of those deactivated and everything runs fine.
The crash happens in QuadField.h line 58, but is introduced in CGameHelper::GuiTraceRay, the start & dir float3s contain NaN
values for some strange reason and further checking showed
that a lot of float operations just return NaN.

GCC 3.4.5 (MingW)
AthlonXp (with sse support)

just checked: it doesn't crash with march=athlon-xp, so it is an issue with i686+SSE+O2

PS: For a very strange reason bibim's builds don't crash o_O
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: SSE+O2 = floats return NaN

Post by Auswaschbar »

You should not use gcc versions prior to 4.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: SSE+O2 = floats return NaN

Post by imbaczek »

yes, use at least gcc 4.2 (mingw release candidate) or tdragon's gcc 4.3.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: SSE+O2 = floats return NaN

Post by jK »

k finally found a working gcc4 build for windows :)
Post Reply

Return to “Engine”