summaryrefslogtreecommitdiff
path: root/arch/loongarch/include/asm/asmmacro.h
diff options
context:
space:
mode:
authorYouling Tang <tangyouling@loongson.cn>2023-02-25 10:52:56 +0300
committerHuacai Chen <chenhuacai@loongson.cn>2023-02-25 17:12:16 +0300
commit396233c650084cb957eb6d87dd4abd3e56a7d499 (patch)
tree8d69c7f5d7d141cf1855545f16cb5ab1b845bcfa /arch/loongarch/include/asm/asmmacro.h
parent8cbd5ebfe241699288cb152081854414f6265718 (diff)
downloadlinux-396233c650084cb957eb6d87dd4abd3e56a7d499.tar.xz
LoongArch: Add la_abs macro implementation
Use the "la_abs macro" instead of the "la.abs pseudo instruction" to prepare for the subsequent PIE kernel. When PIE is not enabled, la_abs is equivalent to la.abs. Signed-off-by: Youling Tang <tangyouling@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include/asm/asmmacro.h')
-rw-r--r--arch/loongarch/include/asm/asmmacro.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/loongarch/include/asm/asmmacro.h b/arch/loongarch/include/asm/asmmacro.h
index be037a40580d..cdc9935d5554 100644
--- a/arch/loongarch/include/asm/asmmacro.h
+++ b/arch/loongarch/include/asm/asmmacro.h
@@ -274,4 +274,8 @@
nor \dst, \src, zero
.endm
+.macro la_abs reg, sym
+ la.abs \reg, \sym
+.endm
+
#endif /* _ASM_ASMMACRO_H */