Bug 1153683 - mozjemalloc: support aarch64/mips64/powerpc64/riscv on FreeBSD.
MozReview-Commit-ID: 5Kx2PZDkeXX
--- 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