提交 90ab311a 编写于 作者: M Masahiro Yamada 提交者: 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: NMasahiro Yamada <masahiroy@kernel.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
Tested-by: NBin Meng <bmeng.cn@gmail.com>
[bmeng: fixed the gas warning]
Signed-off-by: NBin Meng <bmeng.cn@gmail.com>
上级 0d915a9a
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册