]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Define N_PRIMARY_MAP to actually generate a 64-bit constant on 64-bit
authorJulian Seward <jseward@acm.org>
Thu, 28 Apr 2005 10:32:02 +0000 (10:32 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 28 Apr 2005 10:32:02 +0000 (10:32 +0000)
platforms, otherwise the address-masking operations to establish
alignment and primary-mappability are wrong on 64-bit platforms.

Also set the size of fast-mapped address space on 64-bit platforms to
16G.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3580

memcheck/mc_main.c

index 35b66755f2b7c6fb9fba405d3c5ffb867ad3ba62..a33571c6e3073d16a8de5e76cd92a9eaf53d0dc3 100644 (file)
@@ -115,10 +115,23 @@ typedef enum {
 /* --------------- Basic configuration --------------- */
 
 /* Only change this.  N_PRIMARY_MAP *must* be a power of 2. */
-#define N_PRIMARY_BITS  16
+
+#if VEX_HOST_WORDSIZE == 4
+
+/* cover the entire address space */
+#  define N_PRIMARY_BITS  16
+
+#else
+
+/* Just handle the first 16G fast and the rest via auxiliary
+   primaries. */
+#  define N_PRIMARY_BITS  18
+
+#endif
+
 
 /* Do not change this. */
-#define N_PRIMARY_MAP  (1 << N_PRIMARY_BITS)
+#define N_PRIMARY_MAP  (1ULL << N_PRIMARY_BITS)
 
 /* Do not change this. */
 #define MAX_PRIMARY_ADDRESS (Addr)((((Addr)65536) * N_PRIMARY_MAP)-1)