This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PR42861, VTA] bind values to expressions upon MO_VAL_USE
On Thu, Jan 28, 2010 at 03:22:12PM -0800, Steve Ellcey wrote:
> I suspect you are right but I don't understand enough of what
> delegitimize_address hook is doing to write one for PA. I am adding
> Dave Anglin to this email in case he can help. In the mean time I did
> create a small test case from pex-unix.c that still produces the ICE.
pic_ref
= gen_const_mem (Pmode,
gen_rtx_LO_SUM (Pmode, tmp_reg,
gen_rtx_UNSPEC (Pmode,
gen_rtvec (1, orig),
UNSPEC_DLTIND14R)));
As the UNSPEC_DLTIND14R is clearly something you can't emit into debug info,
the delegitimize address hook should transform
(lo_sum x, (unspec [y] UNSPEC_DLTIND14R))
into y.
So something like:
static rtx
pa_delegitimize_address (rtx orig_x)
{
rtx x = delegitimize_mem_from_attrs (orig_x);
if (GET_CODE (x) == LO_SUM
&& GET_CODE (XEXP (x, 1)) == UNSPEC
&& XINT (XEXP (x, 1), 1) == UNSPEC_DLTIND14R)
return XVECEXP (XEXP (x, 1), 0, 0);
return x;
}
could do the job.
Jakub