From adf968c7ec375f5ae6aabed2251dcef884e38467 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 30 Aug 2004 01:28:22 +0000 Subject: [PATCH] * sched-deps.c (get_condition): Fix breakage in previous patch. From-SVN: r86748 --- gcc/ChangeLog | 4 ++++ gcc/sched-deps.c | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82b6956c96f..64ec150d643 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-08-30 Richard Earnshaw + + * sched-deps.c (get_condition): Fix breakage in previous patch. + 2004-08-30 Paul Brook * doc/install.texi: Fix broken mpfr link. diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 18f3d39a9c0..2c551cfabfb 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -141,7 +141,7 @@ static rtx get_condition (rtx insn) { rtx pat = PATTERN (insn); - rtx cond; + rtx src; if (pat == 0) return 0; @@ -152,11 +152,12 @@ get_condition (rtx insn) 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) + 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) -- 2.30.2