2009/2/27 Joern Rennecke <amyl...@spamcop.net>:
> Quoting daniel tian <daniel.xnt...@gmail.com>:
>
>> 2009/2/26 Joern Rennecke <amyl...@spamcop.net>:
>>>>
>>>> the address label "common_reg " used many times. I think it will
>>>> load one time. But after optimized with '-Os' or '-O2', it still loads
>>>> the label "common_reg " six times..
>>>
>>> Previously, you could define LEGITIMIZE_ADDRESS and
>>> LEGITIMIZE_RELOAD_ADDRESS
>>> to get reasonable code. However, that no longer works in gcc 4.4, see
>>> PR38785.
>>>
>>> I have a patch set; if you like, I can it to you. Note, however, that it
>>> is
>>> not known if the FSF have a relevant valid Copyright assignment on file.
>>>
>>
>> I port the gcc with 4.0.2 version. But How to add the code in
>> LEGITIMIZE_RELOAD_ADDRESS. Do you have any example? Thank you very
>> much.
>
> Yes, there are a number of examples in config/*/*.h - just doing a
> grep should give you a goo selection. The port where this macro
> has been added first, in order to avoid unnecessary repetition of
> stack slot address additions, was the SH port.
> The SFmode part is a later addition, which is different because the
> SH3E (and the later 32 bit SH family members with hardware floating
> point) don't have REG+offset addressing for floating point registers,
> but they have REG+index addressing.
> The basic operation of the macro is explained in doc/tm.texi .
> In order to handle pseudos that are equivalent to a constant,
> you need to allow registers that are not suitable as a base
> for REG_OK_STRICT_P (because pseudos aren't), which have
> reg_equiv_constant set.
> You'll have to take the value in reg_equiv_constant and
> do necessary arithmetic with plus_constant in order to compute
> the value to be used in push_reload.
>
Thank you for your reply.
I read some documents.
That seems to solving a address mode problem. My problem is that while
loading a large immediate data or SYMBOL_REF, the destination is a
specified general register (register 0:R0). So I don't how to let the
define_expand "movsi" pattern to generate destination register in R0.
I read some document about "reload" which was a issue that I missed in
former working. Does this problem obstruct the problem ?
Your guys give me some greate advices. I will keep working. Thank you
very much again.