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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs