Re: How can I make gcc reload put my double constant into core register?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/9/26 Terry Guo <flameroc@xxxxxxxxx>:
> Hi there,
>
[...]
>
> Now because no valid constraints for this RTX, the reload has to do
> something to adjust this insn. I want the double const to be reloaded
> into general purpose register first and then the general purpose
> register will be moved to final floating point register. I would like
> to end up with below two RTXs:
>
> (set (reg:SF r4) (const_double:SF 1.1xxx)) // correspond to "r"/"E" constraints.
> (set (reg:SF 114) (reg:SF r4))                   // correspond to
> "=t"/"?r" constraints.
>
> But current gcc always reload const_double into constant pool and then
> the final floating point register is loaded by accessing the memory.
>
[...]
>
> BR,
> Terry

My first guess was that reload phase thinks the cost of
"FPR <- mem" is cheaper than "FPR <- GPR" so that
const_double would go into memory.

Would you check register_move_cost and memory_move_cost
and make sure the relative costs conforming your expectation?


Best regards,
jasonwucj




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux