From: Masahiro Yamada Date: Tue, 3 Dec 2019 14:28:58 +0900 Subject: [U-Boot] [PATCH] x86: simplify ljmp to 32-bit code Message-ID: <20191203052858.23798-1-masahiroy@kernel.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de You can directly specify the label as the operand for ljmp. This commit saves 4-byte code. Signed-off-by: Masahiro Yamada --- arch/x86/cpu/start16.S | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S index bcabd76741ef..7bad9f3e4d87 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: -- 2.17.1