Bug 1153683 - mozjemalloc: support aarch64/mips64/powerpc64/riscv on FreeBSD. draft
authorJan Beich <jbeich@FreeBSD.org>
Fri, 12 May 2017 20:22:23 +0000
changeset 577127 f11b65af0f37b9a4566f4a7950d7a6288b6d95d4
parent 577126 332fe0957388a55cd9c1bb9c9364c1e1bb02ea52
child 628434 d7a97d5c7a0d06a569f8f781d0df8a175d94f75d
push id58619
push userbmo:jbeich@FreeBSD.org
push dateFri, 12 May 2017 21:48:08 +0000
bugs1153683
milestone55.0a1
Bug 1153683 - mozjemalloc: support aarch64/mips64/powerpc64/riscv on FreeBSD. MozReview-Commit-ID: 5Kx2PZDkeXX
memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -504,23 +504,39 @@ static pthread_key_t tlsIndex;
 #  define QUANTUM_2POW_MIN	4
 #  define SIZEOF_PTR_2POW	3
 #  define CPU_SPINWAIT		__asm__ volatile("pause")
 #endif
 #ifdef __arm__
 #  define QUANTUM_2POW_MIN	3
 #  define SIZEOF_PTR_2POW	2
 #endif
+#ifdef __aarch64__
+#  define QUANTUM_2POW_MIN	4
+#  define SIZEOF_PTR_2POW	3
+#endif
 #ifdef __mips__
 #  define QUANTUM_2POW_MIN	3
-#  define SIZEOF_PTR_2POW	2
+#  ifdef __mips_n64
+#    define SIZEOF_PTR_2POW	3
+#  else
+#    define SIZEOF_PTR_2POW	2
+#  endif
 #endif
 #ifdef __powerpc__
 #  define QUANTUM_2POW_MIN	4
-#  define SIZEOF_PTR_2POW	2
+#  ifdef __powerpc64__
+#    define SIZEOF_PTR_2POW	3
+#  else
+#    define SIZEOF_PTR_2POW	2
+#  endif
+#endif
+#ifdef __riscv__
+#  define QUANTUM_2POW_MIN	4
+#  define SIZEOF_PTR_2POW	3
 #endif
 #endif
 
 #define	SIZEOF_PTR		(1U << SIZEOF_PTR_2POW)
 
 /* sizeof(int) == (1U << SIZEOF_INT_2POW). */
 #ifndef SIZEOF_INT_2POW
 #  define SIZEOF_INT_2POW	2