delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/04/10:19:05

Date: Tue, 4 Mar 1997 17:04:09 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: nikki <nikki AT gameboutique DOT co>
cc: djgpp AT delorie DOT com
Subject: Re: Allegro perspective-correct .. (fpu memcopy)
In-Reply-To: <5fh859$nn7@flex.uunet.pipex.com>
Message-ID: <Pine.SUN.3.91.970304170108.12717B-100000@is>
MIME-Version: 1.0

On 4 Mar 1997, nikki wrote:

> > 	2) Cause your program to ignore FP exceptions by including the
> > following somewhere at its beginning:
> > 
> > 	#include <signal.h>
> > 	...
> > 	signal (SIGFPE, SIG_IGN);
> 
> i wasn't aware you could do this actually. does this perhaps mean that you
> could use a memcopy with fld and fstp and just ignore errors like this? it
> would be much faster than the fild fistp version obviously...

Can do: probably (should try to be sure); faster: not necessarily, 
because an exception, even if it's ignored by the DJGPP signal-handling 
mechanism, has a lot of overhead.  It would be interesting to see if this 
will indeed work, and if so, how fast/slow will it be compared to the 
classic memcpy.  And if you try this, it's worth also to try the method 
with masking exceptions using `_control87', since that prevents the 
exception from happening.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019