Commit 1e4c4f61 authored by Borislav Petkov's avatar Borislav Petkov Committed by Ingo Molnar

x86/entry/64: Shorten TEST instructions

Convert TESTL to TESTB and save 3 bytes per callsite.

No functionality change.
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171102120926.4srwerqrr7g72e2k@pd.tnicSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 3383642c
...@@ -620,7 +620,7 @@ GLOBAL(retint_user) ...@@ -620,7 +620,7 @@ GLOBAL(retint_user)
GLOBAL(swapgs_restore_regs_and_return_to_usermode) GLOBAL(swapgs_restore_regs_and_return_to_usermode)
#ifdef CONFIG_DEBUG_ENTRY #ifdef CONFIG_DEBUG_ENTRY
/* Assert that pt_regs indicates user mode. */ /* Assert that pt_regs indicates user mode. */
testl $3, CS(%rsp) testb $3, CS(%rsp)
jnz 1f jnz 1f
ud2 ud2
1: 1:
...@@ -653,7 +653,7 @@ retint_kernel: ...@@ -653,7 +653,7 @@ retint_kernel:
GLOBAL(restore_regs_and_return_to_kernel) GLOBAL(restore_regs_and_return_to_kernel)
#ifdef CONFIG_DEBUG_ENTRY #ifdef CONFIG_DEBUG_ENTRY
/* Assert that pt_regs indicates kernel mode. */ /* Assert that pt_regs indicates kernel mode. */
testl $3, CS(%rsp) testb $3, CS(%rsp)
jz 1f jz 1f
ud2 ud2
1: 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment