Possible bug in regrename.c???

Anders Ådland aaadland@atmel.no
Tue Jul 29 11:45:00 GMT 2003


movhi is accepting all general operands, which makes GCC able to generate 
this pattern. Use a predicate function and constraint letters to restrict 
which patterns movhi is accepting. The avr port is dividing movhi into a 
define_expand and a define_insn, which is a good solution.

Anders

On Mon, 28 Jul 2003 19:03:39 +1000, Marty Hauff <marty.hauff@rmit.edu.au> 
wrote:

> 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
>
>
>





More information about the Gcc mailing list