[pypy-svn] r22078 - in pypy/dist/pypy/translator/llvm: . module

ericvrp at codespeak.net ericvrp at codespeak.net
Thu Jan 12 21:31:36 CET 2006


Author: ericvrp
Date: Thu Jan 12 21:31:29 2006
New Revision: 22078

Modified:
   pypy/dist/pypy/translator/llvm/exception.py
   pypy/dist/pypy/translator/llvm/funcnode.py
   pypy/dist/pypy/translator/llvm/gc.py
   pypy/dist/pypy/translator/llvm/module/genexterns.c
   pypy/dist/pypy/translator/llvm/module/support.py
Log:
WIP fixes and todo markers for making genllvm work on ia64 


Modified: pypy/dist/pypy/translator/llvm/exception.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/exception.py	(original)
+++ pypy/dist/pypy/translator/llvm/exception.py	Thu Jan 12 21:31:29 2006
@@ -168,7 +168,11 @@
         codewriter.unwind()
 
     def llc_options(self):
-        return '-enable-correct-eh-support'
+    	if sys.platform == 'linux2' and sys.maxint == 2**64-1:
+		s = ' -enable-ia64-dag-isel'
+	else:
+		s = ''
+        return '-enable-correct-eh-support' + s
 
 class ExplicitExceptionPolicy(ExceptionPolicy):
     """ uses issubclass() and last_exception tests after each call """
@@ -347,5 +351,9 @@
         codewriter.ret(returntype, self._noresult2(returntype))
 
     def llc_options(self):
-        return ''
+    	if sys.platform == 'linux2' and sys.maxint == 2**64-1:
+		s = '-enable-ia64-dag-isel'
+	else:
+		s = ''
+        return s
     

Modified: pypy/dist/pypy/translator/llvm/funcnode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/funcnode.py	(original)
+++ pypy/dist/pypy/translator/llvm/funcnode.py	Thu Jan 12 21:31:29 2006
@@ -72,7 +72,9 @@
 
     def post_setup_transform(self):
         self.db.exceptionpolicy.transform(self.db.translator, self.graph)
-        remove_exception_mallocs(self.db.translator, self.graph, self.ref)
+	import sys
+	if sys.maxint == 2**31-1:	#XXX not yet 64bit compatible
+        	remove_exception_mallocs(self.db.translator, self.graph, self.ref)
         remove_double_links(self.db.translator, self.graph)
     
     def writedecl(self, codewriter): 

Modified: pypy/dist/pypy/translator/llvm/gc.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/gc.py	(original)
+++ pypy/dist/pypy/translator/llvm/gc.py	Thu Jan 12 21:31:29 2006
@@ -130,7 +130,7 @@
 
         if is_atomic:
             t += '''
-        call ccc void %%llvm.memset(sbyte* %%malloc_Ptr%(cnt)s, ubyte 0, uint %%malloc_SizeU%(cnt)s, uint 0)
+        call ccc void %%llvm.memset(sbyte* %%malloc_Ptr%(cnt)s, ubyte 0, %(uword)s %%malloc_SizeU%(cnt)s, uint 0)
         ''' % locals()
         codewriter.write_lines(t)
 

Modified: pypy/dist/pypy/translator/llvm/module/genexterns.c
==============================================================================
--- pypy/dist/pypy/translator/llvm/module/genexterns.c	(original)
+++ pypy/dist/pypy/translator/llvm/module/genexterns.c	Thu Jan 12 21:31:29 2006
@@ -1,7 +1,7 @@
 
 // we hand craft these in module/support.ll
 char *RPyString_AsString(RPyString*);
-int RPyString_Size(RPyString*);
+int RPyString_Size(RPyString*);	//XXX int->long
 RPyString *RPyString_FromString(char *);
 int RPyExceptionOccurred(void);
 char* LLVM_RPython_StartupCode(void);

Modified: pypy/dist/pypy/translator/llvm/module/support.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/module/support.py	(original)
+++ pypy/dist/pypy/translator/llvm/module/support.py	Thu Jan 12 21:31:29 2006
@@ -17,7 +17,7 @@
 
 internal fastcc int %RPyString_Size(%RPyString* %structstring) {
     %sizeptr = getelementptr %RPyString* %structstring, int 0, uint 1, uint 0
-    %size = load int* %sizeptr
+    %size = load int* %sizeptr	;XXX int ->long
     ret int %size
 }
 



More information about the Pypy-commit mailing list