This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for PR 18294 - IA64 bootstrap failure
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Nov 2004 09:48:40 -0800 (PST)
- Subject: Patch for PR 18294 - IA64 bootstrap failure
- Reply-to: sje at cup dot hp dot com
This is a patch for PR 18294 that is causing an IA64 bootstrap failure.
I did a successful bootstrap and test run on IA64 HP-UX with no
regressions.
I am not 100% happy with it because if validate_change fails then we do
not do the 'else' clause that is outside the POINTERS_EXTEND_UNSIGNED
ifdef like it used to do. The only way I can see to easily do this is
to duplicate that code inside the ifdef as code to run when
validate_change fails. What do others think of this? Can I skip that
portion of the code or should I duplicate it or does someone see a
better way to handle this? I don't want to do the start_sequence call
outside the POINTERS_EXTEND_UNSIGNED ifdef because it isn't needed there
and because I would have to have end_sequence calls before lots of
return and 'goto restart' statements.
Comments?
Steve Ellcey
sje@cup.hp.com
2004-11-10 Steve Ellcey <sje@cup.hp.com>
* function.c (instantiate_virtual_regs_1): Put call to
gen_lowpart inside start_sequence so proper control flow is
maintained.
*** gcc.orig/gcc/function.c Wed Nov 10 09:40:03 2004
--- gcc/gcc/function.c Wed Nov 10 09:37:56 2004
*************** instantiate_virtual_regs_1 (rtx *loc, rt
*** 1574,1587 ****
&& GET_CODE (XEXP (x, 1)) == CONST_INT
&& 0 != (new
= instantiate_new_reg (SUBREG_REG (XEXP (x, 0)),
! &offset))
! && validate_change (object, loc,
! plus_constant (gen_lowpart (ptr_mode,
! new),
! offset
! + INTVAL (XEXP (x, 1))),
! 0))
! return 1;
#endif
else if ((new = instantiate_new_reg (XEXP (x, 0), &offset)) == 0)
{
--- 1574,1595 ----
&& GET_CODE (XEXP (x, 1)) == CONST_INT
&& 0 != (new
= instantiate_new_reg (SUBREG_REG (XEXP (x, 0)),
! &offset)))
! {
! /* gen_lowpart may generate new instructions. */
! start_sequence ();
! if (validate_change (object, loc,
! plus_constant (gen_lowpart (ptr_mode, new),
! offset + INTVAL (XEXP (x, 1))), 0))
! {
! seq = get_insns ();
! end_sequence ();
! emit_insn_before (seq, object);
! return 1;
! }
! else
! end_sequence ();
! }
#endif
else if ((new = instantiate_new_reg (XEXP (x, 0), &offset)) == 0)
{