Message ID | 1485501330-9718-1-git-send-email-yamada.masahiro@socionext.com |
---|---|
State | Accepted |
Commit | b913c3f0790a4785b2cf0afa49d4c3e4ffddc2cd |
Headers | show |
Series | [1/2] arm64: use xzr to zero-out the bss section | expand |
On 26 January 2017 at 23:15, Masahiro Yamada <yamada.masahiro@socionext.com> wrote: > AArch64 has a zero register (xzr). Use it instead of x2. > > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> > --- > > arch/arm/lib/crt0_64.S | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org> _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
On Fri, Jan 27, 2017 at 04:15:29PM +0900, Masahiro Yamada wrote: > 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> Applied to u-boot/master, thanks! -- Tom _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
diff --git a/arch/arm/lib/crt0_64.S b/arch/arm/lib/crt0_64.S index 91b19e0..f8e84b2 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
AArch64 has a zero register (xzr). Use it instead of x2. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- arch/arm/lib/crt0_64.S | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot