https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63359
James Molloy <james.molloy at arm dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |james.molloy at arm dot com
--- Comment #1 from James Molloy <james.molloy at arm dot com> ---
Hi,
> Besides, clang rejects it, so please find a common syntax...
It shouldn't. The "w" modifier should have been supported since clang 3.4, and
is certainly supported in clang 3.5.
Clang 3.5 has a warning about this:
"""
/tmp/test.c:2:27: warning: value size does not match register size specified by
the constraint and modifier [-Wasm-operand-widths]
asm("clz %0, %0":"+r"(i));
^
/tmp/test.c:2:14: note: use constraint modifier "w"
asm("clz %0, %0":"+r"(i));
^~
%w0
/tmp/test.c:2:27: warning: value size does not match register size specified by
the constraint and modifier [-Wasm-operand-widths]
asm("clz %0, %0":"+r"(i));
^
/tmp/test.c:2:18: note: use constraint modifier "w"
asm("clz %0, %0":"+r"(i));
^~
%w0
2 warnings generated.
"""