summaryrefslogtreecommitdiff
path: root/arch/x86/cpu
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2019-12-03 14:28:58 +0900
committerBin Meng <bmeng.cn@gmail.com>2019-12-08 19:10:21 +0800
commit90ab311a7c1ee91201c23726871d20b2287a51a5 (patch)
treef35ad6e8999c51ff9369843db699287a3f383a78 /arch/x86/cpu
parent0d915a9aa4e1f9060dac2c32616a69b391292b84 (diff)
x86: simplify ljmp to 32-bit code
You can directly specify the label as the operand for ljmp. This commit saves 4-byte code. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> [bmeng: fixed the gas warning] Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu')
-rw-r--r--arch/x86/cpu/start16.S4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index bcabd76741..54f4ff6662 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -44,10 +44,8 @@ data32 cs lgdt gdt_ptr
ff:
/* Finally restore BIST and jump to the 32-bit initialization code */
- movw $code32start, %ax
- movw %ax, %bp
movl %ecx, %eax
-data32 cs ljmp *(%bp)
+data32 cs ljmp *code32start
/* 48-bit far pointer */
code32start: