[pypy-svn] r22192 - pypy/dist/pypy/translator/llvm

rxe at codespeak.net rxe at codespeak.net
Sun Jan 15 00:59:34 CET 2006


Author: rxe
Date: Sun Jan 15 00:59:33 2006
New Revision: 22192

Modified:
   pypy/dist/pypy/translator/llvm/gc.py
Log:
Some minor tweaks (and possible temporary ones until we understand what is
going on) to make our nightly build tests work again.



Modified: pypy/dist/pypy/translator/llvm/gc.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/gc.py	(original)
+++ pypy/dist/pypy/translator/llvm/gc.py	Sun Jan 15 00:59:33 2006
@@ -113,8 +113,13 @@
     def gc_libraries(self):
         return ['gc', 'pthread'] # XXX on windows?
 
-
     def malloc(self, codewriter, targetvar, type_, size=1, atomic=False):
+        import sys
+    	if sys.platform == 'linux2' and sys.maxint == 2**63-1:
+            boundary_size = 8
+	else:
+            boundary_size = 0            
+
         is_atomic = atomic
         uword = self.db.get_machine_uword()
         s = str(size)
@@ -130,10 +135,11 @@
 
         if is_atomic:   #Boehm aligns on 8 byte boundaries
             t += '''
-        call ccc void %%llvm.memset(sbyte* %%malloc_Ptr%(cnt)s, ubyte 0, %(uword)s %%malloc_SizeU%(cnt)s, %(uword)s 8)
+        call ccc void %%llvm.memset(sbyte* %%malloc_Ptr%(cnt)s, ubyte 0, %(uword)s %%malloc_SizeU%(cnt)s, %(uword)s %(boundary_size)s)
         ''' % locals()
         codewriter.write_lines(t)
 
+
     def pyrex_code(self):
         return '''
 cdef extern int GC_get_heap_size()



More information about the Pypy-commit mailing list