This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to fix pr55141
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 08 Dec 2012 10:30:28 +0000
- Subject: Re: patch to fix pr55141
- References: <50C25AB6.1000807@redhat.com>
Vladimir Makarov <vmakarov@redhat.com> writes:
> Index: lra-constraints.c
> ===================================================================
> --- lra-constraints.c (revision 194307)
> +++ lra-constraints.c (working copy)
> @@ -3329,8 +3329,9 @@ lra_constraints (bool first_p)
> reg = regno_reg_rtx[i];
> if ((hard_regno = lra_get_regno_hard_regno (i)) >= 0)
> {
> - int j, nregs = hard_regno_nregs[hard_regno][PSEUDO_REGNO_MODE (i)];
> + int j, nregs;
>
> + nregs = hard_regno_nregs[hard_regno][lra_reg_info[i].biggest_mode];
> for (j = 0; j < nregs; j++)
> df_set_regs_ever_live (hard_regno + j, true);
It looks like this loop now iterates over a different mode from the
pseudo register's, but starts at the hard register allocated to the
pseudo. That doesn't work on big-endian targets, where the "extra"
registers come before hard_regno. I think you need to use
simplify_subreg_regno (...subreg_lowpart_offset (...)).
I realise we only support little-endian for 4.8, but still.
Maybe it'd be worth having a helper function that provides the range.
Richard