We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ad8735 commit 93b63f6Copy full SHA for 93b63f6
arch/riscv/include/asm/arch_hweight.h
@@ -26,9 +26,9 @@ static __always_inline unsigned int __arch_hweight32(unsigned int w)
26
27
asm (".option push\n"
28
".option arch,+zbb\n"
29
- CPOPW "%0, %0\n"
+ CPOPW "%0, %1\n"
30
".option pop\n"
31
- : "+r" (w) : :);
+ : "=r" (w) : "r" (w) :);
32
33
return w;
34
@@ -57,9 +57,9 @@ static __always_inline unsigned long __arch_hweight64(__u64 w)
57
58
59
60
- "cpop %0, %0\n"
+ "cpop %0, %1\n"
61
62
63
64
65
0 commit comments