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

           Summary: Incorrect C code produce by llc
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [email protected]


When I convert llvm bytecode to c using the following command:
llc -march=c file.bc file.c

I'm getting some c statements which are not compilable (and/or does not make
sense). Here is one such statement:
__asm__ volatile ("btl %1,%2 ; setcb %b0"
        :"=q"(llvm_cbe_asmtmp)
        :"r"(llvm_cbe_tmp5)"m"(*(llvm_cbe_tmp5))"cc");;

note that llvm_cbe_asmtmp is unsigned char and llvm_cbe_tmp5 is unsigned int. 

Shouldn't the code more be along the lines of  :

 __asm__ volatile ("btl %1,%2 ; setcb %b0"
        :"=q"(llvm_cbe_asmtmp)
        :"r"(llvm_cbe_tmp5), "m"((llvm_cbe_tmp5))
        :"cc");


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