arm64: use xzr to zero-out the bss section
[oweals/u-boot.git] / arch / arm / lib / crt0_64.S
index cad22c7b41fe4c7237acba611057255931d02fea..f8e84b2fc8b56342b03c2d2c01f84791a76bbd7c 100644 (file)
@@ -108,6 +108,7 @@ relocation_return:
  * Set up final (full) environment
  */
        bl      c_runtime_cpu_setup             /* still call old routine */
+#endif /* !CONFIG_SPL_BUILD */
 
 /* TODO: For SPL, call spl_relocate_stack_gd() to alloc stack relocation */
 
@@ -116,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
@@ -130,6 +130,4 @@ clear_loop:
 
        /* NOTREACHED - board_init_r() does not return */
 
-#endif /* !CONFIG_SPL_BUILD */
-
 ENDPROC(_main)