[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-1e4c4f610f774df6088d7c065b2dd4d22adba698@git.kernel.org>
Date: Thu, 2 Nov 2017 05:48:47 -0700
From: tip-bot for Borislav Petkov <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, torvalds@...ux-foundation.org, luto@...nel.org,
tglx@...utronix.de, hpa@...or.com, peterz@...radead.org,
brgerst@...il.com, dave.hansen@...el.com,
linux-kernel@...r.kernel.org, bp@...e.de
Subject: [tip:x86/asm] x86/entry/64: Shorten TEST instructions
Commit-ID: 1e4c4f610f774df6088d7c065b2dd4d22adba698
Gitweb: https://git.kernel.org/tip/1e4c4f610f774df6088d7c065b2dd4d22adba698
Author: Borislav Petkov <bp@...e.de>
AuthorDate: Thu, 2 Nov 2017 13:09:26 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 2 Nov 2017 13:45:37 +0100
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@...e.de>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Brian Gerst <brgerst@...il.com>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20171102120926.4srwerqrr7g72e2k@pd.tnic
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/entry/entry_64.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index 40e9933..84263c7 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:
Powered by blists - more mailing lists