This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] - comparison generation fix for archs without cc0


Even if there is no patterns in .md file which use cc0 and HAVE_cc0 is
not defined, compare_from_rtx still generates comparison between cc0 and
0.
Generated insn will not be later matched to any pattern. So comparison 
between op0 and op1 should be generated instead if HAVE_cc0 is not
defined.


======= ChangeLog entry =======

2002-05-23  Igor Shevlyakov <igor@microunity.com>

	* expr.c (compare_from_rtx): generate comparison between op0 and
op1 
	rather than cc0 and 0 in a case when HAVE_cc0 is not defined.

======= patch ===============

Index: expr.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/expr.c,v
retrieving revision 1.452
diff -c -3 -p -r1.452 expr.c
*** expr.c      7 May 2002 05:44:26 -0000       1.452
--- expr.c      10 May 2002 18:35:45 -0000
*************** compare_from_rtx (op0, op1, code, unsign
*** 9978,9984 ****
--- 9978,9988 ----

    emit_cmp_insn (op0, op1, code, size, mode, unsignedp);

+ #if HAVE_cc0
    return gen_rtx_fmt_ee (code, VOIDmode, cc0_rtx, const0_rtx);
+ #else
+   return gen_rtx_fmt_ee (code, VOIDmode, op0, op1);
+ #endif
  }

  /* Like do_compare_and_jump but expects the values to compare as two
rtx's.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]