aboutsummaryrefslogtreecommitdiff
path: root/include/sbi/riscv_asm.h
diff options
context:
space:
mode:
authorMarouene Boubakri <marouene.boubakri@nxp.com>2021-03-12 12:00:01 +0100
committerAnup Patel <anup@brainfault.org>2021-03-22 16:02:48 +0530
commitbfc85c70e7517dc633b74e33768247b4df6a661c (patch)
tree8495986c0ebfc19121a10e3b1af57c4ea77c7175 /include/sbi/riscv_asm.h
parentddad02d62550ca8884a2bd21345dad8c6c216777 (diff)
include: headers: Replace __ASSEMBLY__ with __ASSEMBLER__
GCC has already a predefined macro __ASSEMBLER__ therefore, it can be used without the need to define a new flag with -D__ASSEMBLY__. This is useful when adding the library to projects having a build system such one can build without the need to make changes. THe build system does not use the Makefile in the sources tree. Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'include/sbi/riscv_asm.h')
-rw-r--r--include/sbi/riscv_asm.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/sbi/riscv_asm.h b/include/sbi/riscv_asm.h
index 10f31a7..9fa0fe5 100644
--- a/include/sbi/riscv_asm.h
+++ b/include/sbi/riscv_asm.h
@@ -14,7 +14,7 @@
/* clang-format off */
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
#define __ASM_STR(x) x
#else
#define __ASM_STR(x) #x
@@ -38,7 +38,7 @@
#define LGREG __REG_SEL(3, 2)
#if __SIZEOF_POINTER__ == 8
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
#define RISCV_PTR .dword
#define RISCV_SZPTR 8
#define RISCV_LGPTR 3
@@ -48,7 +48,7 @@
#define RISCV_LGPTR "3"
#endif
#elif __SIZEOF_POINTER__ == 4
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
#define RISCV_PTR .word
#define RISCV_SZPTR 4
#define RISCV_LGPTR 2
@@ -79,7 +79,7 @@
/* clang-format on */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
#define csr_swap(csr, val) \
({ \
@@ -182,6 +182,6 @@ int pmp_set(unsigned int n, unsigned long prot, unsigned long addr,
int pmp_get(unsigned int n, unsigned long *prot_out, unsigned long *addr_out,
unsigned long *log2len);
-#endif /* !__ASSEMBLY__ */
+#endif /* !__ASSEMBLER__ */
#endif