1 2005-08-19 Uros Bizjak <uros@kss-loka.si>
3 * mode-switching.c (create_pre_exit): Skip assignments to
4 EH_RETURN_STACKADJ_RTX when searching for return_copy insn.
5 Add comment regarding use insn and simplify check for insns,
6 generated by builtin_apply_return.
8 --- gcc/gcc/mode-switching.c 2005-07-05 18:20:07.000000000 +0200
9 +++ gcc/gcc/mode-switching.c 2005-08-19 10:28:41.000000000 +0200
10 @@ -250,6 +250,8 @@ create_pre_exit (int n_entities, int *en
12 if (INSN_P (return_copy))
14 + /* Skip USE patterns inserted by
15 + builtin_apply_return. */
16 if (GET_CODE (PATTERN (return_copy)) == USE
17 && GET_CODE (XEXP (PATTERN (return_copy), 0)) == REG
18 && (FUNCTION_VALUE_REGNO_P
19 @@ -270,6 +272,15 @@ create_pre_exit (int n_entities, int *en
22 copy_reg = SET_DEST (return_copy_pat);
24 +#ifdef EH_RETURN_STACKADJ_RTX
25 + /* Skip assignments to EH_RETURN_STACKADJ_RTX. */
26 + if (rtx_equal_p (copy_reg, EH_RETURN_STACKADJ_RTX))
28 + last_insn = return_copy;
32 if (GET_CODE (copy_reg) == REG)
33 copy_start = REGNO (copy_reg);
34 else if (GET_CODE (copy_reg) == SUBREG
35 @@ -311,8 +322,8 @@ create_pre_exit (int n_entities, int *en
36 if (copy_start >= ret_start
37 && copy_start + copy_num <= ret_end)
39 - else if (!maybe_builtin_apply
40 - || !FUNCTION_VALUE_REGNO_P (copy_start))
41 + else if (!(maybe_builtin_apply
42 + && FUNCTION_VALUE_REGNO_P (copy_start)))
44 last_insn = return_copy;