From 097b55d524bd921e76ac3c6506ba5b4aa32af8f4 Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 21 Sep 2005 18:39:07 +0000 Subject: [PATCH] PR target/22585 * config/i386/i386.c (ix86_prepare_fp_compare_args): Do not force integer op1 into register for XFmode compares. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104498 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 10 ++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 415fd5c5d9b..58b8a36bb6e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-09-21 Uros Bizjak + + PR target/22585 + * config/i386/i386.c (ix86_prepare_fp_compare_args): Do not + force integer op1 into register for XFmode compares. + 2005-09-21 Kazu Hirata PR middle-end/23971 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a53df0be9c5..914e66ea0e0 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -9065,15 +9065,17 @@ ix86_prepare_fp_compare_args (enum rtx_code code, rtx *pop0, rtx *pop1) int is_sse = TARGET_SSE_MATH && SSE_FLOAT_MODE_P (op_mode); /* All of the unordered compare instructions only work on registers. - The same is true of the fcomi compare instructions. The same is - true of the XFmode compare instructions if not comparing with - zero (ftst insn is used in this case). */ + The same is true of the fcomi compare instructions. The XFmode + compare instructions require registers except when comparing + against zero or when converting operand 1 from fixed point to + floating point. */ if (!is_sse && (fpcmp_mode == CCFPUmode || (op_mode == XFmode && ! (standard_80387_constant_p (op0) == 1 - || standard_80387_constant_p (op1) == 1)) + || standard_80387_constant_p (op1) == 1) + && GET_CODE (op1) != FLOAT) || ix86_use_fcomi_compare (code))) { op0 = force_reg (op_mode, op0); -- 2.11.4.GIT