[LLVMbugs] [Bug 2407] New: C backend emits invalid inline asm

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jun 2 23:57:40 PDT 2008


           Summary: C backend emits invalid inline asm
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Backend: C
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu

In llvm-test/MultiSource/Applications/Minisat/Output

$ llc -march=c minisat.llvm.bc -o bugpoint-test-program.bc.cbe.c
$ /usr/bin/gcc -x c -fno-strict-aliasing bugpoint-test-program.bc.cbe.c -x none
-o bugpoint-test-program.bc.cbe.c.gcc.exe -lstdc++ -lm -lm -O2 -Wl,-R.
bugpoint-test-program.bc.cbe.c:393: warning: conflicting types for built-in
function ‘malloc’
bugpoint-test-program.bc.cbe.c: In function ‘main’:
bugpoint-test-program.bc.cbe.c:843: warning: return type of ‘main’ is not
bugpoint-test-program.bc.cbe.c:2617: error: memory input 0 is not directly

The code in question is this:

  __asm__ volatile ("fldcw %0"

The original llvm asm instruction is:

        call void asm sideeffect "fldcw $0", "*m,~{dirflag},~{fpsr},~{flags}"(
i16* %newcw ) nounwind 

Any ideas?

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