http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53789



--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> 2012-12-23 
18:31:30 UTC ---

I implemented a reload pattern to try to do the reload for the following TLS

symbol reference:

"(symbol_ref:SI ("__gmpfr_cache_const_pi") [flags 0x60] <var_decl 0x405e55a0

__gmpfr_cache_const_pi>)"



However, this approach fails here:

      /* ??? It would be useful to be able to handle only two, or more than

         three, operands, but for now we can only handle the case of having

         exactly three: output, input and one temp/scratch.  */

      gcc_assert (insn_data[(int) icode].n_operands == 3);



(gdb) p insn_data[(int) icode].n_operands

$3 = 6 '\006'



I don't see any simple way to reduce the number of scratch registers needed

for the reload.  So, the only possible solution that I can see is to bump the

cost for TLS symbol references to try to avoid the reload.



The reload comes about because we have a pseudo register copy of the

initial address load.  It needs to be spilled rather than using the REG_EQUAL

note.

Reply via email to