A good debugging tool in this situation is to turn on FPU exceptions,
and run in the debugger. It should break on the line that does an
invalid op. Assuming that's what's going on. Might help you, might
not, but when it helps it really helps.
I may be misremembering here:
Doesn't IA32 have some crufty FPU flag that means "Yes, I really want all my floating point exceptions to occur on the instruction that caused them and not the next FPU instruction that I execute which could well be after a branch or a function return". You want to switch that on too.