Message-Id: <200005231133.NAA06460@cerbere.u-strasbg.fr> X-Sender: muller AT ics DOT u-strasbg DOT fr X-Mailer: QUALCOMM Windows Eudora Pro Version 4.0.2 Date: Tue, 23 May 2000 13:14:59 +0200 To: Eli Zaretskii From: Pierre Muller Subject: Re: Simple C program showing FPU problem ! Cc: djgpp-workers AT delorie DOT com References: <200005231107 DOT NAA06048 AT cerbere DOT u-strasbg DOT fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Reply-To: djgpp-workers AT delorie DOT com At 14:10 23/05/00 +0300, you wrote: > >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? Maybe, I did not try the other way around ! >> ! 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. You are totally right here. >Also, what about _status87: shouldn't it be changed as well? I didn't even know this function :( Pierre Muller Institut Charles Sadron 6,rue Boussingault F 67083 STRASBOURG CEDEX (France) mailto:muller AT ics DOT u-strasbg DOT fr Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99