[no bug]clearFPU exception

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

[no bug]clearFPU exception

Post by REDDemon »

Maybe i'm lacking some knowledge about "_asm_" but in the irrMath.h header (line 391):

Code: Select all

REALINLINE void clearFPUException ()
	{
#ifdef IRRLICHT_FAST_MATH
		return;
#ifdef feclearexcept
		feclearexcept(FE_ALL_EXCEPT);
#elif defined(_MSC_VER)
		__asm fnclex;
#elif defined(__GNUC__) && defined(__x86__)
		__asm__ __volatile__ ("fclex \n\t");
#else
#  warn clearFPUException not supported.
#endif
#endif
	}
aren't those pieces of code:

Code: Select all

#ifdef feclearexcept
		feclearexcept(FE_ALL_EXCEPT);
#elif defined(_MSC_VER)
		__asm fnclex;
#elif defined(__GNUC__) && defined(__x86__)
		__asm__ __volatile__ ("fclex \n\t");
#else
#  warn clearFPUException not supported.
#endif

never executed? they always appens after the "return;"
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
pippy3
Posts: 155
Joined: Tue Dec 15, 2009 7:32 am

Post by pippy3 »

asm is a keyword for assembly language. The __volatile__ macro is defined here: http://www.ibiblio.org/gferg/ldp/GCC-In ... HOWTO.html
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

FAST_MATH is not officially supported by the core engine. It merely gives some hints and "sometimes working" pieces of code for further optimization. This part seems to be completely disabled due to problems or some other reason.
Post Reply