diff options
author | JMadgwick <james.madgwick@outlook.com> | 2020-03-05 21:03:44 +0000 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 13:18:48 +0200 |
commit | 64a7c9e2d2f8c9ebdc4c70c16c630cebbd5abe53 (patch) | |
tree | bb1ec37d987918be07f551b956ba3887c1c7d523 /js/src/jsapi-tests/testGCAllocator.cpp | |
parent | 514ff21cbab5c638d9c347ed261a14e8bd5295e6 (diff) | |
download | UXP-64a7c9e2d2f8c9ebdc4c70c16c630cebbd5abe53.tar UXP-64a7c9e2d2f8c9ebdc4c70c16c630cebbd5abe53.tar.gz UXP-64a7c9e2d2f8c9ebdc4c70c16c630cebbd5abe53.tar.lz UXP-64a7c9e2d2f8c9ebdc4c70c16c630cebbd5abe53.tar.xz UXP-64a7c9e2d2f8c9ebdc4c70c16c630cebbd5abe53.zip |
Issue #1471 - Fix building on sparc64 Linux
Correct various pre-processor defines for sparc64 and in mozjemalloc use the JS arm64 allocator on Linux/sparc64.
This corrects build problems opn Linux sparc64 and is in line with bugzilla bug #1275204.
Diffstat (limited to 'js/src/jsapi-tests/testGCAllocator.cpp')
-rw-r--r-- | js/src/jsapi-tests/testGCAllocator.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp index d203019ec..c7f430cb0 100644 --- a/js/src/jsapi-tests/testGCAllocator.cpp +++ b/js/src/jsapi-tests/testGCAllocator.cpp @@ -302,7 +302,8 @@ void unmapPages(void* p, size_t size) { } void* mapMemoryAt(void* desired, size_t length) { -#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) +#if defined(__ia64__) || defined(__aarch64__) || \ + (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__))) MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0); #endif void* region = mmap(desired, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); @@ -324,7 +325,7 @@ mapMemory(size_t length) int fd = -1; off_t offset = 0; // The test code must be aligned with the implementation in gc/Memory.cpp. -#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) +#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__)) void* region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset); if (region == MAP_FAILED) return nullptr; @@ -334,7 +335,7 @@ mapMemory(size_t length) return nullptr; } return region; -#elif defined(__aarch64__) +#elif defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) const uintptr_t start = UINT64_C(0x0000070000000000); const uintptr_t end = UINT64_C(0x0000800000000000); const uintptr_t step = js::gc::ChunkSize; |