OSDN Git Service

2011-05-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
[pf3gnuchains/gcc-fork.git] / gcc / config / i386 / i386.md
index 13a1cde..2e7633d 100644 (file)
@@ -53,6 +53,7 @@
 ;; d -- print duplicated register operand for AVX instruction.
 ;; D -- print condition for SSE cmp instruction.
 ;; P -- if PIC, print an @PLT suffix.
+;; p -- print raw symbol name.
 ;; X -- don't print any sort of PIC '@' suffix for a symbol.
 ;; & -- print some in-use local-dynamic symbol name.
 ;; H -- print a memory address offset by 8; used for sse high-parts
 {
   output_asm_insn
     ("lea{l}\t{%a2@tlsgd(,%1,1), %0|%0, %a2@tlsgd[%1*1]}", operands);
+  if (TARGET_SUN_TLS)
+#ifdef HAVE_AS_IX86_TLSGDPLT
+    return "call\t%a2@tlsgdplt";
+#else
+    return "call\t%p3@plt";
+#endif
   return "call\t%P3";
 }
   [(set_attr "type" "multi")
     ("lea{q}\t{%a1@tlsgd(%%rip), %%rdi|rdi, %a1@tlsgd[rip]}", operands);
   fputs (ASM_SHORT "0x6666\n", asm_out_file);
   fputs ("\trex64\n", asm_out_file);
+  if (TARGET_SUN_TLS)
+    return "call\t%p2@plt";
   return "call\t%P2";
 }
   [(set_attr "type" "multi")
 {
   output_asm_insn
     ("lea{l}\t{%&@tlsldm(%1), %0|%0, %&@tlsldm[%1]}", operands);
+  if (TARGET_SUN_TLS)
+#ifdef HAVE_AS_IX86_TLSLDMPLT
+    return "call\t%&@tlsldmplt";
+#else
+    return "call\t%p2@plt";
+#endif
   return "call\t%P2";
 }
   [(set_attr "type" "multi")
 {
   output_asm_insn
     ("lea{q}\t{%&@tlsld(%%rip), %%rdi|rdi, %&@tlsld[rip]}", operands);
+  if (TARGET_SUN_TLS)
+    return "call\t%p1@plt";
   return "call\t%P1";
 }
   [(set_attr "type" "multi")