[LLVMbugs] [Bug 3505] New: MultiSource/Applications/ minisat jit failure due to inline asm

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Feb 7 12:12:59 PST 2009


           Summary: MultiSource/Applications/minisat jit failure due to
                    inline asm
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu

JIT doesn't support inline asm so:
llvm-dis Output/minisat.llvm.bc -o -|grep asm
        call void asm "fnstcw $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i16*
%oldcw) nounwind
        call void asm sideeffect "fldcw $0",
"*m,~{dirflag},~{fpsr},~{flags}"(i16* %newcw) nounwind

This is because the code uses _FPU_GETCW/SETCW:

#define _FPU_GETCW(cw) __asm__ ("fnstcw %0" : "=m" (*&cw))
#define _FPU_SETCW(cw) __asm__ ("fldcw %0" : : "m" (*&cw))
    __asm__ ("fnstcw %0" : "=m" (*&oldcw)); newcw = (oldcw & ~0x300) | 0x200;
__asm__ ("fldcw %0" : : "m" (*&newcw));

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