Skip to contentSkip to conversation

x86, asm: Use CC_SET()/CC_OUT() in arch/x86/include/asm/signal.h

PATCH New Uros Bizjak 2 participants 2 messages Aug 14, 2018 – Aug 30, 2018 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, asm: Use CC_SET()/CC_OUT() in arch/x86/include/asm/signal.h

Remove open-coded uses of set instructions to use CC_SET()/CC_OUT() in arch/x86/include/asm/signal.h.

---
 arch/x86/include/asm/signal.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/x86/include/asm/signal.h +4 -3
index 5f9012ff52ed..33d3c88a7225 100644
@@ -39,6 +39,7 @@ extern void do_signal(struct pt_regs *regs);
 
 #define __ARCH_HAS_SA_RESTORER
 
+#include <asm/asm.h>
 #include <uapi/asm/sigcontext.h>
 
 #ifdef __i386__
@@ -86,9 +87,9 @@ static inline int __const_sigismember(sigset_t *set, int _sig)
 
 static inline int __gen_sigismember(sigset_t *set, int _sig)
 {
-	unsigned char ret;
-	asm("btl %2,%1\n\tsetc %0"
-	    : "=qm"(ret) : "m"(*set), "Ir"(_sig-1) : "cc");
+	bool ret;
+	asm("btl %2,%1" CC_SET(c)
+	    : CC_OUT(c) (ret) : "m"(*set), "Ir"(_sig-1));
 	return ret;
 }
 
Signature · 1 line
2.17.1
#1 lore raw

[tip:x86/urgent] x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()

x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()
Commit-ID:  26e609eccd37967d3681662433086894830c5d62
Gitweb:     https://git.kernel.org/tip/26e609eccd37967d3681662433086894830c5d62
Author:     Uros Bizjak <[email protected]>
AuthorDate: Tue, 14 Aug 2018 18:59:51 +0200
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 30 Aug 2018 13:02:31 +0200

x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()

Replace open-coded set instructions with CC_SET()/CC_OUT().

---
 arch/x86/include/asm/signal.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/x86/include/asm/signal.h +4 -3
index 5f9012ff52ed..33d3c88a7225 100644
@@ -39,6 +39,7 @@ extern void do_signal(struct pt_regs *regs);
 
 #define __ARCH_HAS_SA_RESTORER
 
+#include <asm/asm.h>
 #include <uapi/asm/sigcontext.h>
 
 #ifdef __i386__
@@ -86,9 +87,9 @@ static inline int __const_sigismember(sigset_t *set, int _sig)
 
 static inline int __gen_sigismember(sigset_t *set, int _sig)
 {
-	unsigned char ret;
-	asm("btl %2,%1\n\tsetc %0"
-	    : "=qm"(ret) : "m"(*set), "Ir"(_sig-1) : "cc");
+	bool ret;
+	asm("btl %2,%1" CC_SET(c)
+	    : CC_OUT(c) (ret) : "m"(*set), "Ir"(_sig-1));
 	return ret;
 }