Re: catching floating point exception on OS X Intel
Re: catching floating point exception on OS X Intel
- Subject: Re: catching floating point exception on OS X Intel
- From: Jonas Maebe <email@hidden>
- Date: Wed, 9 May 2007 15:56:27 +0200
On 9 mei 2007, at 13:51, Jonas Maebe wrote:
int setfpumask(int fpmask) {
int oldmask;
asm volatile ("fstcw _fpucw");
oldmask = fpucw & 0xffc0;
fpucw = fpucw | (fpmask & FPU_ExceptionMask);
Small error, that should read:
int setfpumask(int fpmask) {
int oldmask;
asm volatile ("fstcw _fpucw");
oldmask = fpucw & ~0xffc0;
fpucw = (fpucw & 0xffc0) | (fpmask & FPU_ExceptionMask);
Jonas
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden