mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
5 years ago
committed by
GitHub
5 changed files with 32 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||||
|
#define DUK_USE_ARCH_STRING "riscv32" |
||||
|
#define DUK_USE_BYTEORDER 1 |
||||
|
#define DUK_USE_PACKED_TVAL |
@ -0,0 +1,3 @@ |
|||||
|
#define DUK_USE_ARCH_STRING "riscv64" |
||||
|
#define DUK_USE_BYTEORDER 1 |
||||
|
#undef DUK_USE_PACKED_TVAL |
@ -0,0 +1,15 @@ |
|||||
|
/* 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 */ |
Loading…
Reference in new issue