x86, bitops: remove use of "sbb" to return CF
Use SETC instead of SBB to return the value of CF from assembly. Using SETcc enables uniformity with other flags-returning pieces of assembly code. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Link: http://lkml.kernel.org/r/1465414726-197858-2-git-send-email-hpa@linux.intel.com Reviewed-by: Andy Lutomirski <luto@kernel.org> Reviewed-by: Borislav Petkov <bp@suse.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
This commit is contained in:

committed by
H. Peter Anvin

parent
f5967101e9
commit
2823d4da5d
@@ -440,10 +440,7 @@ static inline unsigned long get_vflags(struct kernel_vm86_regs *regs)
|
||||
|
||||
static inline int is_revectored(int nr, struct revectored_struct *bitmap)
|
||||
{
|
||||
__asm__ __volatile__("btl %2,%1\n\tsbbl %0,%0"
|
||||
:"=r" (nr)
|
||||
:"m" (*bitmap), "r" (nr));
|
||||
return nr;
|
||||
return test_bit(nr, bitmap->__map);
|
||||
}
|
||||
|
||||
#define val_byte(val, n) (((__u8 *)&val)[n])
|
||||
|
Reference in New Issue
Block a user