Hi,

Seems there are still some exceptions.

During my testing, the compiler complains:

./os_core.c: In function 'OS_EventTaskWait':
./os_core.c:747: error: unable to find a register to spill in class
'POINTER_REGS'
./os_core.c:747: error: this is the insn:
(insn 7 6 8 2 ./os_core.c:739 (set (mem/s/f:HI (plus:HI (reg/f:HI 16
R16 [orig:39 OSTCBCur.39 ] [39])
                (const_int 13 [0xd])) [11 <variable>.OSTCBEventPtr+0 S2 A8])
        (reg/v/f:HI 2 R2 [orig:40 pevent ] [40])) 48 {*movhi} (nil))
./os_core.c:747: confused by earlier errors, bailing out


I guess that it is caused by that there is only one register "R18" in
"POINTER_REGS" class.

I have changed "LEGITIMIZE_RELOAD_ADDRESS" several times, but still can't work.

Do I miss some "macro" definition?

Could someone give some direction?

Thanks!

Jiang



2010/7/26 Ian Lance Taylor <i...@google.com>:
> redriver jiang <jiang.redri...@gmail.com> writes:
>
>> But the constrains are really long.
>
> Well, yeah.
>
>> I use "U" for memory operands with address "R18+offset", and "S" for
>> memory operands with address "R16" or "R17", and "Q" for memory
>> operands with constant address(such as symbol ref, or const_int), the
>> all combinations are as more as 43 types, and I have to change
>> "MAX_RECOG_ALTERNATIVES" from "30" to be larger constants in
>> "recog.h".
>>
>> (define_insn "*iorqi3_noimm_to_reg"
>> [(set    (match_operand:QI 0 "register_mem_operand"
>> "=r,r,r,r,r,r,r,r,r,r,r,r,r,U,U,U,S,S,S,Q,Q,Q,U,S,Q,U,U,U,U,U,U,S,S,S,S,S,S,Q,Q,Q,Q,Q,Q")
>>         (ior:QI (match_operand:QI 1 "register_mem_operand"
>> "%0,0,0,0,U,U,U,S,S,S,Q,Q,Q,r,r,r,r,r,r,r,r,r,r,r,r,U,U,U,S,Q,Q,U,U,U,S,Q,Q,U,U,U,S,Q,Q")
>>                      (match_operand:QI 2 "register_mem_operand"
>> "U,S,Q,r,U,S,Q,U,S,Q,U,S,Q,U,S,Q,U,S,Q,U,S,Q,r,r,r,U,S,Q,S,S,Q,U,S,Q,S,S,Q,U,S,Q,S,S,Q")))]
>>  ""
>>  "..."
>>
>> [( set_attr "length"
>> "3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3"
>> )
>> ( set_attr "clobberb"
>> "no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no,no"
>> )])
>>
>>
>> Is there any suggestions about this "long" constraints?
>
> My only useful suggestion is that you can say
>    (set_attr "length" "3")
>    (set_attr "clobberb" "no")
> You don't have to repeat the setting if it is the same for all
> alternatives.
>
> Ian
>

Reply via email to