From 8b609ea571f21f1526a7cbd5da0f6503e1008f61 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Fri, 7 Apr 2017 22:58:28 +0000 Subject: [PATCH] Define 'lr' as x30 on aarch64 GNU toolchain does not recognize LR as standard register alias, but clang does. Use of #define will work on both. Place the definition into central machine/asm.h instead of patching every affected file, as requested by plaftorm maintainers. Reviews by: andrew, emaste, imp Differential Revision: https://reviews.freebsd.org/D10307 --- sys/arm64/include/asm.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/arm64/include/asm.h b/sys/arm64/include/asm.h index 8bd47ed4d89a..251cc668beca 100644 --- a/sys/arm64/include/asm.h +++ b/sys/arm64/include/asm.h @@ -57,6 +57,9 @@ #define PIC_SYM(x,y) x #endif +/* Alias for link register x30 */ +#define lr x30 + /* * Sets the trap fault handler. The exception handler will return to the * address in the handler register on a data abort or the xzr register to