Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Aug 1998 09:20:29 -0400 (EDT)
From:      Luoqi Chen <luoqi@watermarkgroup.com>
To:        current@FreeBSD.ORG, shocking@prth.pgs.com
Subject:   Re:  Floating Point Exceptions, signal handlers & subsequent ops
Message-ID:  <199808251320.JAA23287@lor.watermarkgroup.com>

next in thread | raw e-mail | index | archive | help
> 
> I've noticed in one of my applications that the first FP operation after 
> return from a caught SIGFPE is invalid. I have a signal handler installed that 
> just prints out some basic info (like "SIGFPE caught"). The first FP op after 
> this (in my case, converting a long to a double) just gives garbage. Repeat 
> the same statement and it gives a sensible result. Has anyone else seen this 
> before I file a PR with code to reproduce the problem?
> 
> 
> 	Stephen
> -- 
>   The views expressed above are not those of PGS Tensor.
> 
>     "We've heard that a million monkeys at a million keyboards could produce
>      the Complete Works of Shakespeare; now, thanks to the Internet, we know
>      this is not true."            Robert Wilensky, University of California
> 
> 
Your SIGFPE handler has to restore the FP register stack top, and this is
no easy job to do, you have to handle each exception type differently. It's
not FreeBSD's problem, rather a stupid design on intel's part.

-lq

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808251320.JAA23287>