[LLVMbugs] [Bug 3373] New: frontend doesn't cast inline asm arguments, thus failing with an unsupported asm message

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jan 22 08:52:02 PST 2009


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

           Summary: frontend doesn't cast inline asm arguments, thus failing
                    with an unsupported asm message
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Using yesterday's llvm-gcc (SVN r62706), I fail to build the following:

int foo(unsigned long *addr)
{
  int __ret_pu;
  unsigned long __pu_val;
  return   ({asm volatile("call __put_user_" "8" : "=a" (__ret_pu) :"0"
                          (__pu_val), "c"(addr) : "ebx"); __ret_pu;});
}

$ llvm-gcc x.i -O0 -emit-llvm -o x.bc
x.i: In function ‘foo’:
x.i:5: error: unsupported inline asm: input constraint with a matching output
constraint of incompatible type!

I thought the frontend was supposed to cast the argument to the proper type to
avoid this error message.

LLVM 2.4 accepted this code, and appears to be the kernel people's favourite
way to use inline asm (i.e. return type is int, but input is something else).

Can this be fixed for 2.5 please?


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