From: Richard Pennington <rich@pennware.com>
To: musl@lists.openwall.com
Subject: Clang powerpc pthread_arch.h patch.
Date: Sun, 24 Nov 2013 13:23:44 -0600 [thread overview]
Message-ID: <52925240.7050300@pennware.com> (raw)
I had a problem with clang and __pthread_self() on the powerpc. This is
the patch I applied to work around it.
Index: pthread_arch.h
===================================================================
--- pthread_arch.h (revision 3604)
+++ pthread_arch.h (working copy)
@@ -1,6 +1,11 @@
static inline struct pthread *__pthread_self()
{
+#ifdef __clang__
+ char *tp;
+ __asm__ __volatile__ ("mr %0, 2" : "=r" (tp) : : "2" );
+#else
register char* tp __asm__("r2");
+#endif
return (pthread_t)(tp - 0x7000 - sizeof(struct pthread));
}
-Rich
next reply other threads:[~2013-11-24 19:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 19:23 Richard Pennington [this message]
2013-11-24 22:31 ` Rich Felker
2013-11-24 22:46 ` Richard Pennington
2013-12-02 7:48 ` Rich Felker
2013-12-02 12:50 ` Richard Pennington
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=52925240.7050300@pennware.com \
--to=rich@pennware.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).