On 8 December 2015 at 13:45, Kevin Wolf <[email protected]> wrote: > Coroutines don't save the FPU state, so you're not supposed to use > floating point operations inside coroutines. That the compiler spills > some integer value into a floating point register is a bit nasty...
The compiler will happily use FP registers even for apparently integer code if it thinks that is a better way to do it (eg on some CPUs doing memcpy and other kinds of block data move may go faster via the FPU registers, or it might be faster to spill an integer register into an FP register rather than spilling it to memory). As I see you've already determined, it's the job of setjmp/longjmp to make sure that everything is saved and restored correctly, fp or otherwise... thanks -- PMM
