From: Masahiro Yamada Date: Tue, 3 Dec 2019 05:28:58 +0000 (+0900) Subject: x86: simplify ljmp to 32-bit code X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=90ab311a7c1ee91201c23726871d20b2287a51a5;p=u-boot.git 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 Reviewed-by: Bin Meng Tested-by: Bin Meng [bmeng: fixed the gas warning] Signed-off-by: Bin Meng --- 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: