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]

Re: [PATCH] Use reversed_comparison_code in sched-deps.c


> I've tidied up the logic a bit and installed the following, which at least 
> gets us through the bootstrap with checking on now.

I clearly should be in bed, since I've now forgotten to attach the patch.. 
:-(

2004-08-30  Richard Earnshaw  <rearnsha@arm.com>

	* sched-deps.c (get_condition): Fix breakage in previous patch.
Index: sched-deps.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-deps.c,v
retrieving revision 1.77
diff -p -p -r1.77 sched-deps.c
*** sched-deps.c	29 Aug 2004 21:07:37 -0000	1.77
--- sched-deps.c	30 Aug 2004 01:07:23 -0000
*************** static rtx
*** 141,147 ****
  get_condition (rtx insn)
  {
    rtx pat = PATTERN (insn);
!   rtx cond;
  
    if (pat == 0)
      return 0;
--- 141,147 ----
  get_condition (rtx insn)
  {
    rtx pat = PATTERN (insn);
!   rtx src;
  
    if (pat == 0)
      return 0;
*************** get_condition (rtx insn)
*** 152,162 ****
    if (!any_condjump_p (insn) || !onlyjump_p (insn))
      return 0;
  
!   cond = XEXP (SET_SRC (pc_set (insn)), 0);
!   if (XEXP (cond, 2) == pc_rtx)
!     return cond;
!   else if (XEXP (cond, 1) == pc_rtx)
      {
        enum rtx_code revcode = reversed_comparison_code (cond, insn);
  
        if (revcode == UNKNOWN)
--- 152,163 ----
    if (!any_condjump_p (insn) || !onlyjump_p (insn))
      return 0;
  
!   src = SET_SRC (pc_set (insn));
!   if (XEXP (src, 2) == pc_rtx)
!     return XEXP (src, 0);
!   else if (XEXP (src, 1) == pc_rtx)
      {
+       rtx cond = XEXP (src, 0);
        enum rtx_code revcode = reversed_comparison_code (cond, insn);
  
        if (revcode == UNKNOWN)

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