Browse Source

Add support for LoongArch.

Signed-off-by: liuxiang <liuxiang@loongson.cn>
pull/2559/head
liuxiang 10 months ago
parent
commit
1dcb1c2342
  1. 4
      config/architectures.yaml
  2. 3
      config/architectures/architecture_loongarch64.h.in
  3. 4
      config/helper-snippets/DUK_F_LOONGARCH.h.in

4
config/architectures.yaml

@ -53,6 +53,10 @@ autodetect:
name: RISC-V 64-bit
check: DUK_F_RISCV64
include: architecture_riscv64.h.in
-
name: LOONGARCH 64-bit
check: DUK_F_LOONGARCH64
include: architecture_loongarch64.h.in
-
name: SuperH
check: DUK_F_SUPERH

3
config/architectures/architecture_loongarch64.h.in

@ -0,0 +1,3 @@
#define DUK_USE_ARCH_STRING "loongarch64"
#define DUK_USE_BYTEORDER 1
#undef DUK_USE_PACKED_TVAL

4
config/helper-snippets/DUK_F_LOONGARCH.h.in

@ -0,0 +1,4 @@
/* LOONGARCH64, https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html */
#if defined(__loongarch64)
#define DUK_F_LOONGARCH64
#endif
Loading…
Cancel
Save