This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Possible bug in regrename.c???
- From: "Marty Hauff" <marty dot hauff at rmit dot edu dot au>
- To: <aaadland at atmel dot no>, "Marty Hauff" <marty dot hauff at rmit dot edu dot au>, <gcc at gcc dot gnu dot org>
- Date: Mon, 28 Jul 2003 19:03:39 +1000
- Subject: Re: Possible bug in regrename.c???
The port that I'm doing is based around the AVR and it already has GO_IF_LEGITIMATE_ADDRESS defined. The change that I have made which seems to break the port is modifying the movhi RTX to the following:
(define_insn "movhi" [(set (match_operand:HI 0 "general_operand" "") (match_operand:HI 1 "general_operand" ""))]
""
";movhi_" )
I'm not sure where the GO_IF_LEGITIMATE_ADDRESS macro is used but it certainly isn't called anywhere near where the code is segfaulting. A better macro definition may prevent the offending RTX from being created in the first place but as far as I can see, the offending RTX is legal and therefore should not cause the compiler to segfault???
I'll follow your suggestion through some more though...
Marty Moose
>>> Anders Ådland <aaadland@atmel.no> 07/28/03 16:56 PM >>>
On Sun, 27 Jul 2003 16:08:39 +1000, Marty Hauff <marty.hauff@rmit.edu.au>
wrote:
> I'm still new to GCC but I stumbled across the following anomoly whilst
> trying to make a new port.
>
> The following RTX:
> (set (mem:HI (reg/v/f:HI 8 r8 [44]) [8 S2 A8])
> (mem:HI (pre_dec:HI (mem:HI (plus:HI (reg/f:HI 28 r28)
> (const_int 3 [0x3])) [17 S2 A8])) [8 S2 A8]))
>
> causes set_value_regno() to segfault.
I'm new to GCC too, but had a similar problem. It looks like a pseudo
register is replaced by a memory reference. Is GO_IF_LEGITIMATE_ADDRESS
defined properly, with one strict and one non-strict variant?
Anders