]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xen/arm64: macros: Introduce an assembly macro to alias x30
authorJulien Grall <julien.grall@arm.com>
Mon, 22 Jul 2019 21:39:24 +0000 (22:39 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 29 Jul 2019 23:09:25 +0000 (16:09 -0700)
The return address of a function is always stored in x30. For convenience,
introduce a register alias so "lr" can be used in assembly.

This is defined in asm-arm/arm64/macros.h to allow all assembly files
to use it.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/arm64/entry.S
xen/include/asm-arm/arm64/macros.h

index 97b05f53eacea648affaab3fa523acbd9bb77b05..2d9a2713a1719d5bdd1b31bd0f4a2e94ae90cac4 100644 (file)
@@ -6,11 +6,6 @@
 #include <asm/smccc.h>
 #include <public/xen.h>
 
-/*
- * Register aliases.
- */
-lr      .req    x30             /* link register */
-
 /*
  * Stack pushing/popping (register pairs only). Equivalent to store decrement
  * before, load increment after.
index 9c5e676b37737720573162a2f421908ee9d14094..f981b4f43e846bdcfc3a04b7741ada5bef338da0 100644 (file)
     ldr     \dst, [\dst, \tmp]
     .endm
 
+/*
+ * Register aliases.
+ */
+lr      .req    x30             /* link register */
+
 #endif /* __ASM_ARM_ARM64_MACROS_H */