|
Message-ID: <alpine.LNX.2.20.1601102044510.32597@monopod.intra.ispras.ru> Date: Sun, 10 Jan 2016 20:50:28 +0300 (MSK) From: Alexander Monakov <amonakov@...ras.ru> To: musl@...ts.openwall.com Subject: Re: atomic.h cleanup 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.