News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

OS - Exception handlers

Started by vanjast, May 22, 2010, 06:02:46 PM

Previous topic - Next topic

vanjast

Preparing for my dsp library...
Does anybody know if windoze has FPU/MMX/SSEx exception handlers, and can they link (Callback) my own handler.

Thanks
van

clive

If they fault you can use the normal SEH mechanisms (ie try {} except(EXCEPTION_EXECUTE_HANDLER) {})

Would certainly catch unaligned register load/store.
It could be a random act of randomness. Those happen a lot as well.

qWord

#2
normally the fpu/mmx and xmm exceptions are masked - you must unmask the them using fldcw/fstcw,stmxcsr/ldmxcsr
FPU in a trice: SmplMath
It's that simple!

vanjast

Thanks, Ja, I'm aware of the masking bits, but just worried about an OS handler running away from my app. - Got to keep Control.. :green2

Ghandi

If you are using XP onwards, you could always look at Vectored Exception Handlers, they are called prior to the SEH chain being walked. Seeing as its your code you shouldn't run into any problems with a VEH being installed over the top of yours, i'm unaware of the OS installing any over user installed handlers.

HR,
Ghandi