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

             Bug #: 12570
           Summary: [arm inline asm] invalid operand in inline asm
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: ARM
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


When I compile the following function contains arm inline assembler

int64_t dvmQuasiAtomicRead64(volatile const int64_t* addr)
{
    int64_t value;
    __asm__ __volatile__ ("@ dvmQuasiAtomicRead64\n"
        "ldrexd     %0, %H0, [%1]"
        : "=&r" (value)
        : "r" (addr));
    return value;
}


clang/llvm reports:


Atomic.c:110:27: error: invalid operand in inline asm: '@ dvmQuasiAtomicRead64
ldrexd     $0, ${0:H}, [$1]'
    __asm__ __volatile__ ("@ dvmQuasiAtomicRead64\n"
                          ^
src/vm/Atomic.c:110:27: error: invalid operand in inline asm: '@
dvmQuasiAtomicRead64
ldrexd     $0, ${0:H}, [$1]'
src/vm/Atomic.c:110:27: error: invalid operand in inline asm: '@
dvmQuasiAtomicRead64
ldrexd     $0, ${0:H}, [$1]'
src/vm/Atomic.c:110:27: error: invalid operand in inline asm: '@
dvmQuasiAtomicRead64
ldrexd     $0, ${0:H}, [$1]'
src/vm/Atomic.c:110:27: error: invalid operand in inline asm: '@
dvmQuasiAtomicRead64
ldrexd     $0, ${0:H}, [$1]'


But gcc can compile it successfully.

-- 
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