[vorbis-dev] res0.c / by 0?

Brian Hook brianhook at pyrogon.com
Wed Oct 17 13:04:58 PDT 2001



> Note that you don't see the exception unless you insert
> 
>   __asm{
>           push    edx
>           sub     esp, 4
>           fstcw   [esp]
>           mov     dx, [esp]
>           and     dx, 0xFFFE
>           mov     [esp], dx
>           fldcw   [esp]
>           add     esp, 4
>           pop     edx
>   }

There's a slightly less hairy way of doing this using the MSVC functions
_controlfp() and _control87(), at least it avoids inline asm.  I believe
most other compilers on Win32 also provide similarly named constructs.
Adding a generic interface to disable/enable exceptions may be a good
idea?

Regards,

Brian

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list