[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/16] mes: Add RISC-V architecture detection.
From: |
W. J. van der Laan |
Subject: |
[PATCH 04/16] mes: Add RISC-V architecture detection. |
Date: |
Sat, 24 Apr 2021 14:20:32 +0000 |
* src/mes.c: Add ifdefs to detect when compiled on riscv32 or riscv64
architectures.
---
src/mes.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mes.c b/src/mes.c
index
a5e7f2b69c58978323a27673117f35d328e05e13..dfab22a41c44f3e1d7139715218ee5580d5e4eb0
100644
--- a/src/mes.c
+++ b/src/mes.c
@@ -1426,6 +1426,14 @@ mes_environment (int argc, char *argv[])
arch = "arm";
#elif __x86_64__
arch = "x86_64";
+#elif __riscv
+ #if __riscv_xlen == 32
+ arch = "riscv32";
+ #elif __riscv_xlen == 64
+ arch = "riscv64";
+ #else
+ #error riscv xlen not supported
+ #endif
#else
#error arch not supported
#endif
--
2.27.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 04/16] mes: Add RISC-V architecture detection.,
W. J. van der Laan <=