Commit 90ab311a authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Bin Meng

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's avatarMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
[bmeng: fixed the gas warning]
Signed-off-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
parent 0d915a9a
Pipeline #1578 passed with stages
in 137 minutes and 1 second
......@@ -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:
......
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