This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix i686 unordered fp comparisons
- To: gcc-patches at gcc dot gnu dot org
- Subject: fix i686 unordered fp comparisons
- From: Richard Henderson <rth at cygnus dot com>
- Date: Tue, 31 Oct 2000 17:55:20 -0800
- Cc: jakub at redhat dot com
execute/ieee/fp-cmp-4.c has been broken at -march=i686 for some time.
r~
* config/i386/i386.c (fcmov_comparison_operator): Check for
CCFPmode or CCFPUmode instead of CCmode.
(ix86_expand_fp_movcc): Call ix86_expand_setcc for most
unordered operations as well.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/i386.c,v
retrieving revision 1.187
diff -c -p -d -r1.187 i386.c
*** i386.c 2000/10/31 20:50:29 1.187
--- i386.c 2000/11/01 01:50:26
*************** fcmov_comparison_operator (op, mode)
*** 1339,1345 ****
case EQ: case NE:
return 1;
case LTU: case GTU: case LEU: case ORDERED: case UNORDERED: case GEU:
! if (inmode == CCmode)
return 1;
return 0;
default:
--- 1339,1345 ----
case EQ: case NE:
return 1;
case LTU: case GTU: case LEU: case ORDERED: case UNORDERED: case GEU:
! if (inmode == CCFPmode || inmode == CCFPUmode)
return 1;
return 0;
default:
*************** ix86_expand_fp_movcc (operands)
*** 5600,5605 ****
--- 5600,5611 ----
case LE:
case GE:
case GT:
+ case UNEQ:
+ case UNGE:
+ case UNGT:
+ case UNLE:
+ case UNLT:
+ case LTGT:
tmp = gen_reg_rtx (QImode);
ix86_expand_setcc (code, tmp);
code = NE;