Commit bef5105b by Roger Sayle Committed by Roger Sayle

builtins.c (expand_builtin_expect_jump): Fix mistake in my last patch.


	* builtins.c (expand_builtin_expect_jump): Fix mistake in my
	last patch.  Use XEXP (x, 0) to get a LABEL_REF's CODE_LABEL.

From-SVN: r76064
parent dd3adcf8
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> 2004-01-17 Daniel Jacobowitz <drow@mvista.com>
* rtl.h (emit_insn_before_sameloc, emit_jump_insn_before_sameloc) * rtl.h (emit_insn_before_sameloc, emit_jump_insn_before_sameloc)
......
...@@ -4492,16 +4492,16 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -4492,16 +4492,16 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label)
/* First check if we recognize any of the labels. */ /* First check if we recognize any of the labels. */
if (GET_CODE (then_dest) == LABEL_REF if (GET_CODE (then_dest) == LABEL_REF
&& XEXP (then_dest, 1) == if_true_label) && XEXP (then_dest, 0) == if_true_label)
taken = 1; taken = 1;
else if (GET_CODE (then_dest) == LABEL_REF else if (GET_CODE (then_dest) == LABEL_REF
&& XEXP (then_dest, 1) == if_false_label) && XEXP (then_dest, 0) == if_false_label)
taken = 0; taken = 0;
else if (GET_CODE (else_dest) == LABEL_REF else if (GET_CODE (else_dest) == LABEL_REF
&& XEXP (else_dest, 1) == if_false_label) && XEXP (else_dest, 0) == if_false_label)
taken = 1; taken = 1;
else if (GET_CODE (else_dest) == LABEL_REF else if (GET_CODE (else_dest) == LABEL_REF
&& XEXP (else_dest, 1) == if_true_label) && XEXP (else_dest, 0) == if_true_label)
taken = 0; taken = 0;
/* Otherwise check where we drop through. */ /* Otherwise check where we drop through. */
else if (else_dest == pc_rtx) else if (else_dest == pc_rtx)
...@@ -4511,7 +4511,7 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -4511,7 +4511,7 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label)
if (next && GET_CODE (next) == JUMP_INSN if (next && GET_CODE (next) == JUMP_INSN
&& any_uncondjump_p (next)) && 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 /* NEXT is either a CODE_LABEL, NULL_RTX or something
else that can't possibly match either target label. */ else that can't possibly match either target label. */
...@@ -4527,7 +4527,7 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label) ...@@ -4527,7 +4527,7 @@ expand_builtin_expect_jump (tree exp, rtx if_false_label, rtx if_true_label)
if (next && GET_CODE (next) == JUMP_INSN if (next && GET_CODE (next) == JUMP_INSN
&& any_uncondjump_p (next)) && 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) if (next == if_false_label)
taken = 0; taken = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment