summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2017-11-02 13:09:26 +0100
committerIngo Molnar <mingo@kernel.org>2017-11-02 13:45:37 +0100
commit1e4c4f610f774df6088d7c065b2dd4d22adba698 (patch)
treeda9e10630db8a0ad05b42c8b2b3e8fe107cc6055
parent3383642c2f9d4f5b4fa37436db4a109a1a10018c (diff)
x86/entry/64: Shorten TEST instructions
Convert TESTL to TESTB and save 3 bytes per callsite. No functionality change. Signed-off-by: Borislav 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.tnic Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/entry/entry_64.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 40e9933a2d33..84263c79a119 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -620,7 +620,7 @@ GLOBAL(retint_user)
GLOBAL(swapgs_restore_regs_and_return_to_usermode)
#ifdef CONFIG_DEBUG_ENTRY
/* Assert that pt_regs indicates user mode. */
- testl $3, CS(%rsp)
+ testb $3, CS(%rsp)
jnz 1f
ud2
1:
@@ -653,7 +653,7 @@ retint_kernel:
GLOBAL(restore_regs_and_return_to_kernel)
#ifdef CONFIG_DEBUG_ENTRY
/* Assert that pt_regs indicates kernel mode. */
- testl $3, CS(%rsp)
+ testb $3, CS(%rsp)
jz 1f
ud2
1: