Pelles C forum
Pelles C => Feature requests => Topic started by: Dickie-Doo on March 08, 2012, 05:56:28 AM
-
I find it a bit awkward that _asm statements seem to have been dropped from the x64 environment, but I appreciate the attempt to provide access to most things for which one might use _asm as intrinsic functions. One set seems to be missing, however, the 3 functions that access the fpu control word. Normally one would write _asm fldcw ... , _asm fnstcw... etc., but since that is not allowed, we need some intrinsics to use instead. Yes, there are functions fesetround() and fegetround(), but I want to change the precision bits! Or can I set the precision down to 53 bits by using one of the pragmas? (Why would I want this? I'm interested in experimenting with 'double double' arithmetic.)
-
fenv.h (fesetenv with fenv_t.status set to whatever you want)?
-
Thanks - it's a bit messy but it works - however...
Setting the PC bits didn't seem to have any effect, so I finally went in with the debugger and was very surprised to find that Pellle doesn't use the x87-type fpu - he uses the SIMD SSE/SSE2 extensions (on my I5 processor at least)! These ops are intrinsically limited to 53 bits. So my supplementary question is: can I rely on this, or does Pelle switch to the legacy fpu under some circumstances?