http://llvm.org/bugs/show_bug.cgi?id=21270
Bug ID: 21270
Summary: [AArch64] Clang incorrectly warns with %wX register
constraints
Product: clang
Version: trunk
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Hi,
The following function provokes a warning on Clang trunk, 3.5, and AppleClang
based on 3.4:
void g(int one, int two) {
long wide_two = two;
asm ("%w0 %1" : "+r" (one), "+r"(wide_two));
}
/Users/jammol01/Code/test.c:3:25: warning: value size does not match register
size specified by the constraint and modifier
[-Wasm-operand-widths]
asm ("%w0 %1" : "+r" (one), "+r"(wide_two));
^
/Users/jammol01/Code/test.c:3:13: note: use constraint modifier "w"
asm ("%w0 %1" : "+r" (one), "+r"(wide_two));
^~
%w1
Obviously this warning is wrong - the second parameter is of type long
(64-bit). This spurious warning is affected by the type of "one" - if I change
"one" to "wide_one" (64-bit extended version) and remove the %w qualifier, it
compiles fine.
Cheers,
James
--
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