Skip to content

Commit

Permalink
x86/asm: Use CC_SET()/CC_OUT() in __gen_sigismember()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Uros Bizjak authored and Thomas Gleixner committed Aug 30, 2018
1 parent 9222f60 commit 26e609e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/x86/include/asm/signal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 26e609e

Please sign in to comment.