This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm] post_modify constraint failure (was Re: Patch ping)
On Tue, 2004-04-20 at 15:12, Paul Brook wrote:
> > /work/rearnsha/gnu/egcs/arm-elf/libstdc++-v3/include/complex:1455: error:
> > insn d oes not satisfy its constraints:
> > (insn:HI 2559 6401 6402 47
> > /work/rearnsha/gnu/egcs/arm-elf/libstdc++-v3/include/ streambuf:187 (set
> > (mem/s:SI (post_modify:SI (reg:SI 12 ip)
> > (plus:SI (reg:SI 12 ip)
> > (const_int 28 [0x1c]))) [9
> > <variable>._vptr.basic_streambuf+ 0 S4 A32])
> > (reg/f:SI 3 r3 [314])) 140 {*arm_movsi_insn} (insn_list 2558 (nil))
> > (expr_list:REG_DEAD (reg/f:SI 3 r3 [314])
> > (expr_list:REG_INC (reg:SI 12 ip)
> > (nil))))
> >
> > Then I think this is because arm_legitimate_address_p is doing something
> > wrong. Probably this test:
> >
> > else if ((GET_CODE (x) == POST_MODIFY || GET_CODE (x) == PRE_MODIFY)
> > && GET_MODE_SIZE (mode) <= 4
> > && arm_address_register_rtx_p (XEXP (x, 0), strict_p)
> > && GET_CODE (XEXP (x, 1)) == PLUS
> > && XEXP (XEXP (x, 1), 0) == XEXP (x, 0))
> >
> > That final equivalence should probably be using rtx_equal_p(), but I
> > haven't tested that yet.
>
> It does fix the problem. Patch below.
>
> Tested with cross-compiler to arm-none-elf.
> Ok?
>
> Paul
>
> 2004-04-20 Paul Brook <paul@codesourcery.com>
>
> * config/arm/arm.c (arm_legitimate_address_p): Use rtx_equal_p.
>
OK.
R.