* [PATCH] x86, asm: Use CC_SET()/CC_OUT() in arch/x86/include/asm/signal.h
@ 2018-08-14 16:59 Uros Bizjak
2018-08-30 11:07 ` [tip:x86/urgent] x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember() tip-bot for Uros Bizjak
0 siblings, 1 reply; 2+ messages in thread
From: Uros Bizjak @ 2018-08-14 16:59 UTC (permalink / raw)
To: linux-kernel; +Cc: x86, Uros Bizjak
Remove open-coded uses of set instructions to use CC_SET()/CC_OUT() in arch/x86/include/asm/signal.h.
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
---
arch/x86/include/asm/signal.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 5f9012ff52ed..33d3c88a7225 100644
--- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h
@@ -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;
}
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:x86/urgent] x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()
2018-08-14 16:59 [PATCH] x86, asm: Use CC_SET()/CC_OUT() in arch/x86/include/asm/signal.h Uros Bizjak
@ 2018-08-30 11:07 ` tip-bot for Uros Bizjak
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Uros Bizjak @ 2018-08-30 11:07 UTC (permalink / raw)
To: linux-tip-commits; +Cc: ubizjak, mingo, hpa, linux-kernel, tglx
Commit-ID: 26e609eccd37967d3681662433086894830c5d62
Gitweb: https://git.kernel.org/tip/26e609eccd37967d3681662433086894830c5d62
Author: Uros Bizjak <ubizjak@gmail.com>
AuthorDate: Tue, 14 Aug 2018 18:59:51 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
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().
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20180814165951.13538-1-ubizjak@gmail.com
---
arch/x86/include/asm/signal.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h
index 5f9012ff52ed..33d3c88a7225 100644
--- a/arch/x86/include/asm/signal.h
+++ b/arch/x86/include/asm/signal.h
@@ -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;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-30 11:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-14 16:59 [PATCH] x86, asm: Use CC_SET()/CC_OUT() in arch/x86/include/asm/signal.h Uros Bizjak
2018-08-30 11:07 ` [tip:x86/urgent] x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember() tip-bot for Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome