From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Fri, 27 Jan 2017 07:15:29 +0000 (+0900)
Subject: arm64: use xzr to zero-out the bss section
X-Git-Tag: v2025.01-rc5-pxa1908~7511
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=b913c3f0790a4785b2cf0afa49d4c3e4ffddc2cd;p=u-boot.git

arm64: use xzr to zero-out the bss section

AArch64 has a zero register (xzr).  Use it instead of x2.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S
index 91b19e00da..f8e84b2fc8 100644
--- a/arch/arm/lib/crt0_64.S
+++ b/arch/arm/lib/crt0_64.S
@@ -117,9 +117,8 @@ relocation_return:
  */
 	ldr	x0, =__bss_start		/* this is auto-relocated! */
 	ldr	x1, =__bss_end			/* this is auto-relocated! */
-	mov	x2, #0
 clear_loop:
-	str	x2, [x0]
+	str	xzr, [x0]
 	add	x0, x0, #8
 	cmp	x0, x1
 	b.lo	clear_loop