I noticed in the latest CilkPlus ABI specification (https://www.cilkplus.org/sites/default/files/open_specifications/CilkPlu...), it says that the caller to the library must set the floating point flags (top of page 8). This is what the LLVM implementation of CilkPlus and its runtime do, but the current Intel version of the run-time has the code to save the floating point status registers that is in LLVM's code generator and not the runtime from the LLVM repository. Please could you tell me whether:
a) The floating point status flags should be set/saved by the caller
b) The floating point status flags should be set/saved by the callee
c) There's something I've overlooked
The ABI says:
specific floating point state. mxcsr and fpcsr should be
* set when CILK_SETJMP is called in client code. Note that the Win64
* jmpbuf for the Intel64 architecture already contains this information
* so there is no need
to use these fields on that OS/architecture.
The Intel runtime has:
__asm__ ( "stmxcsr %0\n\t"
"fnstcw %1" : : "m" ((sf).mxcsr), "m" ((sf).fpcsr));");
The LLVM runtime does not have this, but the CilkPlus specific file in the LLVM code generator has equivalent code.