Browse Source

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>
Masahiro Yamada 4 years ago
parent
commit
90ab311a7c
1 changed files with 1 additions and 3 deletions
  1. 1 3
      arch/x86/cpu/start16.S

+ 1 - 3
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: