Bug 1357874 - Add more AArch64 support to JS code; r=luke

* Fix a parentheses warning when compiling testGCAllocator.cpp.

* Define GETRANDOM_NR macro for AArch64.

* Disable Android workarounds in jsnativestack.cpp and
  WasmSignalHandlers.cpp for AArch64, because AArch64 is only supported
  on API 21+, in which case those workarounds don't apply.

* Enable trace logging in TraceLogging.cpp.
This commit is contained in:
Jim Chen 2017-05-01 14:46:00 -04:00
Родитель d87c5f7e78
Коммит 50d30e203b
5 изменённых файлов: 11 добавлений и 7 удалений

Просмотреть файл

@ -315,7 +315,7 @@ mapMemoryAt(void* desired, size_t length)
#if defined(__ia64__) || defined(__aarch64__) || \
(defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__)))
MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0);
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);
if (region == MAP_FAILED)

Просмотреть файл

@ -66,6 +66,8 @@
# define GETRANDOM_NR 318
# elif defined(__i386__)
# define GETRANDOM_NR 355
# elif defined(__aarch64__)
# define GETRANDOM_NR 278
# elif defined(__arm__)
# define GETRANDOM_NR 384
// Added other architectures:

Просмотреть файл

@ -16,7 +16,7 @@
# include <pthread_np.h>
# endif
# if defined(ANDROID)
# if defined(ANDROID) && !defined(__aarch64__)
# include <sys/types.h>
# include <unistd.h>
# endif
@ -120,11 +120,11 @@ js::GetNativeStackBaseImpl()
rc = pthread_stackseg_np(pthread_self(), &ss);
stackBase = (void*)((size_t) ss.ss_sp - ss.ss_size);
stackSize = ss.ss_size;
# elif defined(ANDROID)
# elif defined(ANDROID) && !defined(__aarch64__)
if (gettid() == getpid()) {
// bionic's pthread_attr_getstack doesn't tell the truth for the main
// thread (see bug 846670). So we scan /proc/self/maps to find the
// segment which contains the stack.
// bionic's pthread_attr_getstack prior to API 21 doesn't tell the truth
// for the main thread (see bug 846670). So we scan /proc/self/maps to
// find the segment which contains the stack.
rc = -1;
// Put the string on the stack, otherwise there is the danger that it

Просмотреть файл

@ -61,7 +61,7 @@ rdtsc(void)
return result;
}
#elif defined(__arm__)
#elif defined(__arm__) || defined(__aarch64__)
#include <sys/time.h>

Просмотреть файл

@ -1374,6 +1374,7 @@ ProcessHasSignalHandlers()
sTriedInstallSignalHandlers = true;
#if defined(ANDROID)
# if !defined(__aarch64__)
// Before Android 4.4 (SDK version 19), there is a bug
// https://android-review.googlesource.com/#/c/52333
// in Bionic's pthread_join which causes pthread_join to return early when
@ -1385,6 +1386,7 @@ ProcessHasSignalHandlers()
if (atol(version_string) < 19)
return false;
}
# endif
# if defined(MOZ_LINKER)
// Signal handling is broken on some android systems.
if (IsSignalHandlingBroken())