lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 28 Jul 2019 14:51:40 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com
Cc:     x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] x86: drop REG_OUT macro from hweight functions

Output register is always RAX/EAX.

Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---

 arch/x86/include/asm/arch_hweight.h |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--- a/arch/x86/include/asm/arch_hweight.h
+++ b/arch/x86/include/asm/arch_hweight.h
@@ -6,10 +6,8 @@
 
 #ifdef CONFIG_64BIT
 #define REG_IN "D"
-#define REG_OUT "a"
 #else
 #define REG_IN "a"
-#define REG_OUT "a"
 #endif
 
 static __always_inline unsigned int __arch_hweight32(unsigned int w)
@@ -17,7 +15,7 @@ static __always_inline unsigned int __arch_hweight32(unsigned int w)
 	unsigned int res;
 
 	asm (ALTERNATIVE("call __sw_hweight32", "popcntl %1, %0", X86_FEATURE_POPCNT)
-			 : "="REG_OUT (res)
+			 : "=a" (res)
 			 : REG_IN (w));
 
 	return res;
@@ -45,7 +43,7 @@ static __always_inline unsigned long __arch_hweight64(__u64 w)
 	unsigned long res;
 
 	asm (ALTERNATIVE("call __sw_hweight64", "popcntq %1, %0", X86_FEATURE_POPCNT)
-			 : "="REG_OUT (res)
+			 : "=a" (res)
 			 : REG_IN (w));
 
 	return res;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ