From a940d8bd4858902caa50028fc7df056d6578dda1 Mon Sep 17 00:00:00 2001 From: Clinton Popetz Date: Thu, 1 Jun 2000 14:41:31 +0000 Subject: [PATCH] i386.c (ix86_use_fcomi_compare): Make global. * config/i386/i386.c (ix86_use_fcomi_compare): Make global. * config/i386/i386-protos.h (ix86_use_fcomi_compare): Declare. * config/i386/i386.md (*fp_jcc_3, *fp_jcc_4): Disable if we will use FCOMI. From-SVN: r34338 --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/i386-protos.h | 1 + gcc/config/i386/i386.c | 3 +-- gcc/config/i386/i386.md | 6 ++++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 495ccf840da..40fd0617355 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Thu Jun 1 09:37:35 2000 Clinton Popetz + + * config/i386/i386.c (ix86_use_fcomi_compare): Make global. + * config/i386/i386-protos.h (ix86_use_fcomi_compare): Declare. + * config/i386/i386.md (*fp_jcc_3, *fp_jcc_4): Disable if we + will use FCOMI. + 2000-06-01 Richard Henderson * Makefile.in (c-decl.o): Depend on $(EXPR_H), not expr.h. diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 3bd06b11c0d..d7a4110d4cb 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -99,6 +99,7 @@ extern int ix86_unary_operator_ok PARAMS ((enum rtx_code, enum machine_mode, rtx[])); extern int ix86_match_ccmode PARAMS ((rtx, enum machine_mode)); extern rtx ix86_expand_fp_compare PARAMS ((enum rtx_code, rtx, rtx, rtx)); +extern int ix86_use_fcomi_compare PARAMS ((enum rtx_code)); extern void ix86_expand_branch PARAMS ((enum rtx_code, rtx)); extern int ix86_expand_setcc PARAMS ((enum rtx_code, rtx)); extern int ix86_expand_int_movcc PARAMS ((rtx[])); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 0d9672851a5..23a868229ae 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -392,7 +392,6 @@ static void put_condition_code PARAMS ((enum rtx_code, enum machine_mode, static enum rtx_code unsigned_comparison PARAMS ((enum rtx_code code)); static rtx ix86_expand_int_compare PARAMS ((enum rtx_code, rtx, rtx)); static enum machine_mode ix86_fp_compare_mode PARAMS ((enum rtx_code)); -static int ix86_use_fcomi_compare PARAMS ((enum rtx_code)); static enum rtx_code ix86_prepare_fp_compare_args PARAMS ((enum rtx_code, rtx *, rtx *)); static rtx ix86_expand_compare PARAMS ((enum rtx_code)); @@ -4539,7 +4538,7 @@ ix86_fp_compare_mode (code) /* Return true if we should use an FCOMI instruction for this fp comparison. */ -static int +int ix86_use_fcomi_compare (code) enum rtx_code code; { diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index cdadf5d0e71..36c9d1fbbcc 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -7153,7 +7153,8 @@ (clobber (match_scratch:HI 4 "=a"))] "TARGET_80387 && (GET_MODE (operands[1]) == SFmode || GET_MODE (operands[1]) == DFmode) - && GET_MODE (operands[1]) == GET_MODE (operands[2])" + && GET_MODE (operands[1]) == GET_MODE (operands[2]) + && !ix86_use_fcomi_compare (GET_CODE (operands[0]))" "#") (define_insn "*fp_jcc_4" @@ -7168,7 +7169,8 @@ (clobber (match_scratch:HI 4 "=a"))] "TARGET_80387 && (GET_MODE (operands[1]) == SFmode || GET_MODE (operands[1]) == DFmode) - && GET_MODE (operands[1]) == GET_MODE (operands[2])" + && GET_MODE (operands[1]) == GET_MODE (operands[2]) + && !ix86_use_fcomi_compare (GET_CODE (operands[0]))" "#") (define_insn "*fp_jcc_5"