This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PPro/CC_FCOMI patch
- To: hjl at varesearch dot com
- Subject: Re: PPro/CC_FCOMI patch
- From: John Wehle <john at feith dot com>
- Date: Sun, 18 Apr 1999 21:11:28 -0400 (EDT)
- Cc: egcs-patches at egcs dot cygnus dot com, law at cygnus dot com
> Here is the CC_FCOMI patch with 2 missing parts.
I turned up a couple of problems.
1) output_float_compare merely checks if operand 1 is
a stack register when deciding if FCOMI can be used.
FCOMI requires that both operands be stack registers
and the patterns currently allow operand 0 to be a
memory operand.
2) IEEE comparisons are not handled correctly. For example:
#include <floatingpoint.h>
volatile double a;
volatile double b;
main()
{
fpsetmask(~FP_X_INV);
*(unsigned long long *)&a = 0xffffffffffffffffULL;
*(unsigned long long *)&b = 0xffffffffffffffffULL;
if (a > b)
abort();
exit(0);
}
should never abort when compiled for IEEE. Unfortunately it does
when using your patch and compiling with -mieee-fp -march=pentiumpro.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------