15 lines
407 B
C
15 lines
407 B
C
/* RISC-V, https://github.com/riscv/riscv-toolchain-conventions#cc-preprocessor-definitions */
|
|
#if defined(__riscv)
|
|
#define DUK_F_RISCV
|
|
#if defined(__riscv_xlen)
|
|
#if (__riscv_xlen == 32)
|
|
#define DUK_F_RISCV32
|
|
#elif (__riscv_xlen == 64)
|
|
#define DUK_F_RISCV64
|
|
#else
|
|
#error __riscv_xlen has unsupported value (not 32 or 64)
|
|
#endif
|
|
#else
|
|
#error __riscv defined without __riscv_xlen
|
|
#endif
|
|
#endif /* __riscv */
|