[LLVMbugs] [Bug 6780] New: clang++ -m32 breaks inline asm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 5 02:18:01 PDT 2010


           Summary: clang++ -m32 breaks inline asm
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: rdivacky at freebsd.org
                CC: llvmbugs at cs.uiuc.edu

pes delta$ cat atomicity.cc
extern          "C" {
typedef int     _Atomic_word;
namespace __gnu_cxx 
        _Atomic_word    __attribute__((__unused__)) __exchange_and_add(volatile
_Atomic_word * __mem, int __val){
                register _Atomic_word __result;
                __asm__         __volatile__("lock; xadd{l}
{%0,%1|%1,%0}":"=r"(__result), "=m"(*__mem):"0"(__val), "m"(*__mem));
                                return  __result;
pes delta$ g++ -c -m32 atomicity.cc && echo success
pes delta$ clang++ -c -m32 atomicity.cc && echo success
/tmp/cc-NbWHQp.s: Assembler messages:
/tmp/cc-NbWHQp.s:22: Error: invalid character '{' in mnemonic
clang: error: assembler command failed with exit code 1 (use -v to see
pes delta$

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list