[LLVMbugs] [Bug 2102] New: Inline asm constants incorrect in CBE output

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Feb 26 15:01:58 PST 2008


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

           Summary: Inline asm constants incorrect in CBE output
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: C
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: criswell at uiuc.edu
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=1466)
 --> (http://llvm.org/bugs/attachment.cgi?id=1466)
LLVM Assembly Code that exhibits the problem

The C Backend does not correctly generate inline asm that uses constants.

For example, it takes this:

%tmp1 = call i32 asm sideeffect "add $$8, $0\0A",
"={ax},~{dirflag},~{fpsr},~{flags}"( ) nounwind     ; <i32> [#uses=1]

And translates it into this:

__asm__ volatile ("add %%8, %0\n"
        :"=a"(llvm_cbe_tmp1)
        :);

The 8 should be "$8" and not "%%8" in the output.

An LLVM assembly case is attached.  To reproduce:

llvm-as -o test.bc test.ll
llc -march=c -f -o test.cbe.c test.bc


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