From: Alexander Monakov <amonakov@ispras.ru>
To: musl@lists.openwall.com
Subject: Re: atomic.h cleanup
Date: Sun, 10 Jan 2016 20:50:28 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.20.1601102044510.32597@monopod.intra.ispras.ru> (raw)
In-Reply-To: <20160110173509.GG2016@debian>
On Sun, 10 Jan 2016, Markus Wichmann wrote:
> | static inline int a_sc(volatile int* p, int x)
> | {
> | __asm__ goto ("stwcx. %0, 0, %1\n\tbne- %l2" : : "r"(x), "r"(p) : "cc", "memory" : fail);
> | return 1;
> | fail:
> | return 0;
> | }
>
> I tested the assembler output from both gcc and clang and it looks
> alright to me (testcase attached).
"asm goto" is an extension that appeared in gcc 4.5 and is not supported in
clang (I get "error: expected '(' after 'asm'" with clang 3.7). I don't know
why you claim it works with clang.
Corresponding llvm bugs (no plans to add support soon):
https://llvm.org/bugs/show_bug.cgi?id=9295
https://llvm.org/bugs/show_bug.cgi?id=14406
Alexander
next prev parent reply other threads:[~2016-01-10 17:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-10 12:21 Markus Wichmann
2016-01-10 16:57 ` Rich Felker
2016-01-10 17:35 ` Markus Wichmann
2016-01-10 17:50 ` Alexander Monakov [this message]
2016-01-11 16:35 ` Markus Wichmann
2016-01-11 17:12 ` Jens Gustedt
2016-01-11 19:03 ` Szabolcs Nagy
2016-01-11 20:56 ` Jens Gustedt
2016-01-14 22:12 ` Rich Felker
2016-01-14 22:37 ` Jens Gustedt
2016-01-14 23:32 ` Rich Felker
2016-01-15 0:46 ` Szabolcs Nagy
2016-01-10 17:37 ` Markus Wichmann
2016-01-22 0:09 ` Rich Felker
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=alpine.LNX.2.20.1601102044510.32597@monopod.intra.ispras.ru \
--to=amonakov@ispras.ru \
--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).