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

[Bug target/42564] unrecognizable insn with -O -fPIC

------- Comment #8 from ebotcazou at gcc dot gnu dot org  2010-01-02 23:00 -------
The root of the problem is plus_constant wrapping up a TLS symbol in a CONST:

(const:DI (plus:DI (symbol_ref:DI ("m") [flags 0x1a] <var_decl m>)
        (const_int 4 [0x4])))

what the SPARC back-end doesn't like.  So something like this works:

Index: explow.c
--- explow.c    (revision 155516)
+++ explow.c    (working copy)
@@ -137,7 +137,8 @@ plus_constant (rtx x, HOST_WIDE_INT c)

     case SYMBOL_REF:
     case LABEL_REF:
-      all_constant = 1;
+      if (CONSTANT_ADDRESS_P (x))
+       all_constant = 1;

     case PLUS:

but I presume other back-ends may not necessarily like it.



------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

Reply to: