NO

Author Topic: Missing instrinsic functions?  (Read 3948 times)

Dickie-Doo

  • Guest
Missing instrinsic functions?
« 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.)

iZzz32

  • Guest
Re: Missing instrinsic functions?
« Reply #1 on: March 08, 2012, 02:55:58 PM »
fenv.h (fesetenv with fenv_t.status set to whatever you want)?
« Last Edit: March 08, 2012, 02:57:54 PM by iZzz32 »

Dickie-Doo

  • Guest
Re: Missing instrinsic functions?
« Reply #2 on: March 12, 2012, 11:57:52 PM »
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?