Julien Grall writes:

> 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.gr...@arm.com>
Reviewed-by: Volodymyr Babchuk <volodymyr_babc...@epam.com>

>
> ---
>     Changes in v2:
>         - Patch added
> ---
>  xen/arch/arm/arm64/entry.S         | 5 -----
>  xen/include/asm-arm/arm64/macros.h | 5 +++++
>  2 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm64/entry.S
> index 97b05f53ea..2d9a2713a1 100644
> --- a/xen/arch/arm/arm64/entry.S
> +++ b/xen/arch/arm/arm64/entry.S
> @@ -7,11 +7,6 @@
>  #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.
>   */
> diff --git a/xen/include/asm-arm/arm64/macros.h 
> b/xen/include/asm-arm/arm64/macros.h
> index 9c5e676b37..f981b4f43e 100644
> --- a/xen/include/asm-arm/arm64/macros.h
> +++ b/xen/include/asm-arm/arm64/macros.h
> @@ -21,5 +21,10 @@
>      ldr     \dst, [\dst, \tmp]
>      .endm
>  
> +/*
> + * Register aliases.
> + */
> +lr      .req    x30             /* link register */
> +
>  #endif /* __ASM_ARM_ARM64_MACROS_H */


-- 
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to