Date: Tue, 23 May 2000 14:10:45 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Pierre Muller cc: djgpp-workers AT delorie DOT com Subject: Re: Simple C program showing FPU problem ! In-Reply-To: <200005231107.NAA06048@cerbere.u-strasbg.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 23 May 2000, Pierre Muller wrote: > .global ___djgpp_npx_hdlr > ___djgpp_npx_hdlr: > pushl %eax > + fnstsw ___djgpp_fpu_status > + fnclex > xorl %eax,%eax > outb %al,$0x0f0 > movb $0x20,%al Shouldn't we access the I/O port *before* clearing the exceptions, like Intel says? > ! xchgw ___djgpp_fpu_status,%ax > ! movzwl %ax, %eax > ! cmpl %eax,%eax > ! jne L__clear87_end > fstsw %ax > movzwl %ax, %eax > fclex > + L__clear87_end: Why do you avoid FCLEX if the status word is taken from the value saved by the interrupt handler? This would make _clear87 incompatible with what it does today: the current version *always* clears the FPU. Also, what about _status87: shouldn't it be changed as well?