http://llvm.org/bugs/show_bug.cgi?id=10352
Summary: inline asm can't tie bool to "q" constraint
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Consider this code:
template <typename T>
inline void test(T desired) {
__asm__ __volatile__("foo %0" : : "q" (desired));
}
void helper() {
bool v; // char, short, float, double, unsigned long long all work
test(v);
}
Note that the failure about "foo" not being a valid mnemonic is not a problem.
The problem is:
$ clang z.cc
fatal error: error in backend: Couldn't allocate input reg for constraint 'q'!
GCC thinks this is fine:
$ gcc z.cc
z.cc: Assembler messages:
z.cc:3: Error: no such instruction: `foo %al'
--
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