From: Uros Bizjak <ubizjak@gmail.com>
To: Rainer Orth <ro@cebitec.uni-bielefeld.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [build] Fix Solaris 2/x86 GD/LD TLS code sequences with Sun ld
Date: Tue, 24 May 2011 16:43:00 -0000 [thread overview]
Message-ID: <BANLkTi=Y1fm9Lyj_Xox-EedHqqOg2xvc1A@mail.gmail.com> (raw)
In-Reply-To: <yddy61wrv80.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
On Tue, May 24, 2011 at 5:09 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
>> Since handling of "p" is not conditional (that is, controlled by some
>> compile flag), it is IMO better to just output correct assembly from
>> the insn pattern itself. You will also output lower-case "@plt" which
>
> I think I tried something along these lines, but failed with duplicate
> @plt@plt for PIC code.
Hm, there is no %P1 present, so I don't think this should be an issue.
>> is IIRC preferred by Sun assebler.
>
> I've never seen such an issue.
OK, it is your call... please change @plt to @PLT if desired.
>> Something like attached (untested) patch.
>
> Unfortunately, the Solaris 10/x86 bootstrap fails in the stage1 libgomp:
>
> /vol/gcc/src/hg/trunk/solaris/libgomp/single.c: In function 'GOMP_single_start':
> /vol/gcc/src/hg/trunk/solaris/libgomp/single.c:55:1: internal compiler error: ou
> tput_operand: '%&' used without any local dynamic TLS references
Yeah, I found the problem in tlsgdplt template, please find attached
new version of the patch...
Uros.
[-- Attachment #2: t.diff.txt --]
[-- Type: text/plain, Size: 1263 bytes --]
Index: i386.md
===================================================================
--- i386.md (revision 174119)
+++ i386.md (working copy)
@@ -12367,6 +12367,12 @@
{
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%a3@plt";
+#endif
return "call\t%P3";
}
[(set_attr "type" "multi")
@@ -12397,6 +12403,8 @@
("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%a2@plt";
return "call\t%P2";
}
[(set_attr "type" "multi")
@@ -12424,6 +12432,12 @@
{
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%a2@plt";
+#endif
return "call\t%P2";
}
[(set_attr "type" "multi")
@@ -12450,6 +12464,8 @@
{
output_asm_insn
("lea{q}\t{%&@tlsld(%%rip), %%rdi|rdi, %&@tlsld[rip]}", operands);
+ if (TARGET_SUN_TLS)
+ return "call\t%a1@plt";
return "call\t%P1";
}
[(set_attr "type" "multi")
next prev parent reply other threads:[~2011-05-24 15:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-23 20:04 Rainer Orth
2011-05-23 21:32 ` Uros Bizjak
2011-05-24 16:42 ` Rainer Orth
2011-05-24 16:43 ` Uros Bizjak [this message]
2011-05-24 17:19 ` Rainer Orth
2011-05-24 17:40 ` Joseph S. Myers
2011-05-24 17:40 ` Uros Bizjak
2011-05-24 17:41 ` Rainer Orth
2011-05-24 18:07 ` Uros Bizjak
2011-05-26 11:12 ` Rainer Orth
2011-05-27 0:47 ` Uros Bizjak
2011-05-27 13:35 ` Rainer Orth
2011-05-27 14:00 ` Uros Bizjak
2011-05-27 16:57 ` Rainer Orth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=Y1fm9Lyj_Xox-EedHqqOg2xvc1A@mail.gmail.com' \
--to=ubizjak@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ro@cebitec.uni-bielefeld.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).