Skip to content

Commit 28b5244

Browse files
agattidpgeorge
authored andcommitted
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 <[email protected]>
1 parent 2a8f604 commit 28b5244

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

extmod/modplatform.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@
4848
#elif defined(__xtensa__)
4949
#define MICROPY_PLATFORM_ARCH "xtensa"
5050
#elif defined(__riscv)
51+
#if __riscv_xlen == 64
52+
#define MICROPY_PLATFORM_ARCH "riscv64"
53+
#else
5154
#define MICROPY_PLATFORM_ARCH "riscv"
55+
#endif
5256
#else
5357
#define MICROPY_PLATFORM_ARCH ""
5458
#endif

0 commit comments

Comments
 (0)