Skip to content

Commit 26e609e

Browse files
ubizjakKAGA-KOKO
authored andcommitted
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
1 parent 9222f60 commit 26e609e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

arch/x86/include/asm/signal.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ extern void do_signal(struct pt_regs *regs);
3939

4040
#define __ARCH_HAS_SA_RESTORER
4141

42+
#include <asm/asm.h>
4243
#include <uapi/asm/sigcontext.h>
4344

4445
#ifdef __i386__
@@ -86,9 +87,9 @@ static inline int __const_sigismember(sigset_t *set, int _sig)
8687

8788
static inline int __gen_sigismember(sigset_t *set, int _sig)
8889
{
89-
unsigned char ret;
90-
asm("btl %2,%1\n\tsetc %0"
91-
: "=qm"(ret) : "m"(*set), "Ir"(_sig-1) : "cc");
90+
bool ret;
91+
asm("btl %2,%1" CC_SET(c)
92+
: CC_OUT(c) (ret) : "m"(*set), "Ir"(_sig-1));
9293
return ret;
9394
}
9495

0 commit comments

Comments
 (0)