http://llvm.org/bugs/show_bug.cgi?id=6780

           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: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


pes delta$ cat atomicity.cc
extern          "C" {
}
typedef int     _Atomic_word;
namespace __gnu_cxx 
__attribute__((__visibility__("default")))
{
        _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
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
invocation)
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to