Add loongarch64 support

Add loongarch64 definitions & lua module setjmp asm

LoongArch is a new RISC ISA, which is a bit like MIPS or RISC-V.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Han Gao <gaohan@uniontech.com>
Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
Closes #13422
This commit is contained in:
Han Gao
2023-04-26 07:05:45 +08:00
committed by GitHub
parent 6b6aaf6dc2
commit 6d59d5df98
5 changed files with 120 additions and 2 deletions
+17 -1
View File
@@ -246,10 +246,26 @@ extern "C" {
#define _SUNOS_VTOC_16
/*
* LoongArch arch specific defines
* only LoongArch64 is supported yet
*/
#elif defined(__loongarch__) && defined(__loongarch_lp64)
#if !defined(_LP64)
#define _LP64
#endif
#define _ZFS_LITTLE_ENDIAN
#define _SUNOS_VTOC_16
/* not all LoongArch cores support unaligned accesses in hardware */
#define _ALIGNMENT_REQUIRED 1
#else
/*
* Currently supported:
* x86_64, x32, i386, arm, powerpc, s390, sparc, mips, and RV64G
* x86_64, x32, i386, arm, powerpc, s390, sparc, mips, RV64G, and LoongArch64
*/
#error "Unsupported ISA type"
#endif