+2004-01-17 Roger Sayle <roger@eyesopen.com>
+
+ * builtins.c (expand_builtin_expect_jump): Fix mistake in my
+ last patch. Use XEXP (x, 0) to get a LABEL_REF's CODE_LABEL.
+
2004-01-17 Daniel Jacobowitz <drow@mvista.com>
* rtl.h (emit_insn_before_sameloc, emit_jump_insn_before_sameloc)
/* First check if we recognize any of the labels. */
if (GET_CODE (then_dest) == LABEL_REF
- && XEXP (then_dest, 1) == if_true_label)
+ && XEXP (then_dest, 0) == if_true_label)
taken = 1;
else if (GET_CODE (then_dest) == LABEL_REF
- && XEXP (then_dest, 1) == if_false_label)
+ && XEXP (then_dest, 0) == if_false_label)
taken = 0;
else if (GET_CODE (else_dest) == LABEL_REF
- && XEXP (else_dest, 1) == if_false_label)
+ && XEXP (else_dest, 0) == if_false_label)
taken = 1;
else if (GET_CODE (else_dest) == LABEL_REF
- && XEXP (else_dest, 1) == if_true_label)
+ && XEXP (else_dest, 0) == if_true_label)
taken = 0;
/* Otherwise check where we drop through. */
else if (else_dest == pc_rtx)
if (next && GET_CODE (next) == JUMP_INSN
&& any_uncondjump_p (next))
- next = XEXP (SET_SRC (pc_set (next)), 1);
+ next = XEXP (SET_SRC (pc_set (next)), 0);
/* NEXT is either a CODE_LABEL, NULL_RTX or something
else that can't possibly match either target label. */
if (next && GET_CODE (next) == JUMP_INSN
&& any_uncondjump_p (next))
- next = XEXP (SET_SRC (pc_set (next)), 1);
+ next = XEXP (SET_SRC (pc_set (next)), 0);
if (next == if_false_label)
taken = 0;