From 28b52446669b72f9863902510430bdeeaaa39fa6 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Wed, 4 Dec 2024 22:45:28 +0100 Subject: [PATCH] extmod/modplatform: Distinguish RISC-V 64 from RISC-V 32. This commit lets the platform module report a more accurate architecture name when running on a RISC-V 64 bits platform. Signed-off-by: Alessandro Gatti --- extmod/modplatform.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extmod/modplatform.h b/extmod/modplatform.h index 5c9cbffb2a..a155f071cb 100644 --- a/extmod/modplatform.h +++ b/extmod/modplatform.h @@ -48,7 +48,11 @@ #elif defined(__xtensa__) #define MICROPY_PLATFORM_ARCH "xtensa" #elif defined(__riscv) +#if __riscv_xlen == 64 +#define MICROPY_PLATFORM_ARCH "riscv64" +#else #define MICROPY_PLATFORM_ARCH "riscv" +#endif #else #define MICROPY_PLATFORM_ARCH "" #endif