forked from mirrors/gecko-dev
Bug 1756570 - [loong64] Add basic build support for LoongArch64 port. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D139567
This commit is contained in:
parent
276701f973
commit
62341514c5
4 changed files with 13 additions and 2 deletions
|
|
@ -526,6 +526,9 @@ def split_triplet(triplet, allow_msvc=False, allow_wasi=False):
|
|||
elif cpu in ("riscv64", "riscv64gc"):
|
||||
canonical_cpu = "riscv64"
|
||||
endianness = "little"
|
||||
elif cpu.startswith("loongarch64"):
|
||||
canonical_cpu = "loongarch64"
|
||||
endianness = "little"
|
||||
elif cpu == "sh4":
|
||||
canonical_cpu = "sh4"
|
||||
endianness = "little"
|
||||
|
|
|
|||
|
|
@ -202,8 +202,9 @@ using namespace mozilla;
|
|||
// depending on kernel configuration, so they are opted out by default.
|
||||
// Debug builds are opted out too, for test coverage.
|
||||
#ifndef MOZ_DEBUG
|
||||
# if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
|
||||
!defined(__aarch64__) && !defined(__powerpc__) && !defined(XP_MACOSX)
|
||||
# if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
|
||||
!defined(__aarch64__) && !defined(__powerpc__) && !defined(XP_MACOSX) && \
|
||||
!defined(__loongarch__)
|
||||
# define MALLOC_STATIC_PAGESIZE 1
|
||||
# endif
|
||||
#endif
|
||||
|
|
@ -471,6 +472,8 @@ static const size_t kChunkSizeMask = kChunkSize - 1;
|
|||
// Platform specific page size conditions copied from js/public/HeapAPI.h
|
||||
# if defined(__powerpc64__)
|
||||
static const size_t gPageSize = 64_KiB;
|
||||
# elif defined(__loongarch64)
|
||||
static const size_t gPageSize = 16_KiB;
|
||||
# else
|
||||
static const size_t gPageSize = 4_KiB;
|
||||
# endif
|
||||
|
|
|
|||
|
|
@ -165,6 +165,9 @@
|
|||
#elif defined __aarch64__ || defined _M_ARM64
|
||||
# define RETURN_INSTR 0xd65f03c0 /* ret */
|
||||
|
||||
#elif defined __loongarch64
|
||||
# define RETURN_INSTR 0x4c000020 /* jirl zero, ra, 0 */
|
||||
|
||||
#elif defined __ia64
|
||||
struct ia64_instr {
|
||||
uint32_t mI[4];
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ CPU_bitness = {
|
|||
"arm": 32,
|
||||
"hppa": 32,
|
||||
"ia64": 64,
|
||||
"loongarch64": 64,
|
||||
"m68k": 32,
|
||||
"mips32": 32,
|
||||
"mips64": 64,
|
||||
|
|
@ -95,6 +96,7 @@ CPU_preprocessor_checks = OrderedDict(
|
|||
("mips64", "__mips64"),
|
||||
("mips32", "__mips__"),
|
||||
("riscv64", "__riscv && __riscv_xlen == 64"),
|
||||
("loongarch64", "__loongarch64"),
|
||||
("sh4", "__sh__"),
|
||||
("wasm32", "__wasm32__"),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue