[D-runtime] Fibers and x87/SSE control words?

David Nadlinger code at klickverbot.at
Mon Feb 13 10:51:08 PST 2012


After a few hours of reverse-engineering x86 SEH, I finally got 
exceptions in fibers working on my Windows Server 2008 R2 box – sorry, 
Sean, that I reported them working after your previous changes, I was 
only testing on my XP VM. Please see: 
https://github.com/D-Programming-Language/druntime/pull/150 (not 
super-urgent, but fixes the Thrift async client code)

Anyway, while working on the code, I noticed that we are currently not 
saving/restoring the x87 and SSE control words. Now, I'd certainly love 
to keep the context switching overhead as low as possible, but should we 
add a pair of stmxcsr/ldmxcsr reps. fnstcw/fldcw for the sake of 
correctness?

If necessary, I can prepare a patch.

David


More information about the D-runtime mailing list