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