[llvm-commits] [poolalloc] r155771 - in /poolalloc/trunk/runtime: DynamicTypeChecks/TypeRuntime.cpp Makefile
    Will Dietz 
    wdietz2 at illinois.edu
       
    Sat Apr 28 15:00:15 PDT 2012
    
    
  
Author: wdietz2
Date: Sat Apr 28 17:00:15 2012
New Revision: 155771
URL: http://llvm.org/viewvc/llvm-project?rev=155771&view=rev
Log:
Fix TypeCheck runtime for 32bit, re-enable to build by default.
The adjusted fixed address probably doesn't actually work, but
  is easily fixed by anyone who goes to actually use the typecheck runtime.
(Which they have to do the 64bit version ATM anyway if the default address
 doesn't work on their system/platform)
Modified:
    poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp
    poolalloc/trunk/runtime/Makefile
Modified: poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp?rev=155771&r1=155770&r2=155771&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp (original)
+++ poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.cpp Sat Apr 28 17:00:15 2012
@@ -18,8 +18,16 @@
 
 #define DEBUG (0)
 
+#if ( __WORDSIZE == 64 )
+#define ARCH_64 1
+#endif
+
 /* Size of shadow memory.  We're hoping everything fits in 46bits. */
+#ifdef ARCH_64
 #define SIZE ((size_t)(1L << 46))
+#else
+#define SIZE ((size_t)(1L << 31))
+#endif
 
 /* Fixed start of memory.  Needs to be page-aligned,
  * and it needs to be large enough that program itself is loaded below it
@@ -29,7 +37,12 @@
  * For now, run a version of the tool without the base fixed, and 
  * choose address.
  */
+#ifdef ARCH_64
 #define BASE ((TypeTagTy *)(0x2aaaad01e000))
+#else
+#define BASE ((TypeTagTy *)(0))
+#endif
+
 /*
  * Do some macro magic to get mmap macros defined properly on all platforms.
  */
Modified: poolalloc/trunk/runtime/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/Makefile?rev=155771&r1=155770&r2=155771&view=diff
==============================================================================
--- poolalloc/trunk/runtime/Makefile (original)
+++ poolalloc/trunk/runtime/Makefile Sat Apr 28 17:00:15 2012
@@ -6,6 +6,6 @@
 #
 # List all of the subdirectories that we will compile.
 #
-DIRS=FreeListAllocator FL2Allocator PreRT DynCount
+DIRS=FreeListAllocator FL2Allocator PreRT DynCount DynamicTypeChecks
 
 include $(LEVEL)/Makefile.common
    
    
More information about the llvm-commits
mailing list