X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f Date: Tue, 30 Sep 2003 11:46:10 +0300 (EET DST) From: Esa A E Peuha Sender: peuha AT sirppi DOT helsinki DOT fi To: djgpp-workers AT delorie DOT com Subject: Re: Bug in modfl() in libc.a In-Reply-To: <19e.1a96f796.2ca9f8ef@aol.com> Message-ID: References: <19e DOT 1a96f796 DOT 2ca9f8ef AT aol DOT com> 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 Mon, 29 Sep 2003 Kbwms AT aol DOT com wrote: > Please send a copy of the finished code and I will test it in the test suite. /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ .text .globl ___modfl ___modfl: pushl %ebp movl %esp,%ebp subl $4,%esp fldt 8(%ebp) movl 20(%ebp),%eax fnstcw -2(%ebp) movw -2(%ebp),%dx orb $0x0c,%dh movw %dx,-4(%ebp) fldcw -4(%ebp) fld %st(0) frndint fldcw -2(%ebp) fld %st(0) fstpt (%eax) fucom %st(1) fnstsw -2(%ebp) movw -2(%ebp),%dx andb $0x44,%dh xorb $0x40,%dh jnz 0f fxam fnstsw -2(%ebp) fstp %st(0) fstp %st(0) fldz movw -2(%ebp),%dx andb $0x02,%dh jz 1f fchs jmp 1f 0: fsubrp %st,%st(1) 1: leave ret -- Esa Peuha student of mathematics at the University of Helsinki http://www.helsinki.fi/~peuha/