From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Jim Wilson Cc: hjl@lucon.org (H.J. Lu), scox@cygnus.com, crux@pool.informatik.rwth-aachen.de, egcs@cygnus.com Subject: Re: More fp bug in egcs Date: Tue, 05 May 1998 05:03:00 -0000 Message-id: <23110.894354239@hurl.cygnus.com> References: <199805010234.TAA02560@ada.cygnus.com.cygnus.com> X-SW-Source: 1998-05/msg00123.html In message <199805010234.TAA02560@ada.cygnus.com.cygnus.com>you write: > I believe this is another bug in the same i386 code as my last patch. > > The problem is that the only FP->DImode converstion instruction pops the > FP stack. Normally we have both popping and non-popping versions of > instructions. The x86 code handles this by aborting if we need to emit > the non-existent non-popping instruction. However, this can't work all > of the time, because it assumes the optimizer always generates optimal > code. That isn't safe. And it is obviously not safe if we are compiling > without optimization. > > In order to fix this, we need to emulate the missing instruction if gcc > needs to emit it. The following patch does this. If there is a better wa > y > to do this, then let me know. > > Thu Apr 30 19:28:16 1998 Jim Wilson > > * i386.c (output_fix_trunc): Add code to emulate non-popping DImode > case. I went ahead and checked this into the release branch and the mainline sources. jeff