[pypy-svn] r22441 - pypy/dist/pypy/translator/llvm/module

ericvrp at codespeak.net ericvrp at codespeak.net
Thu Jan 19 15:25:46 CET 2006


Author: ericvrp
Date: Thu Jan 19 15:25:43 2006
New Revision: 22441

Modified:
   pypy/dist/pypy/translator/llvm/module/support.py
Log:
some handcoded llvm for function that require long->int wrappers,
but which are not automatically generated because they are not
external functions. Now standalones for demo/ricards.py and demo/bpnn.py 
can be created. Theywill not run though!
("Fatal error during initialization: out of memory")


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 19 15:25:43 2006
@@ -88,6 +88,18 @@
     ret void
 }
 
+internal fastcc int %pypy_entry_point(%RPyListOfString* %argv) {
+    %result = call long %pypy_entry_point(%RPyListOfString* %argv)
+    %tmp = cast long %result to int
+    ret int %tmp
+}
+
+internal fastcc void %pypy__RPyListOfString_SetItem__listPtr_Signed_rpy_stringPtr(%RPyListOfString* %l_1, int %index_0, %RPyString* %newstring_0) {
+    %index_0_long = cast int %index_0 to long
+    call void %pypy__RPyListOfString_SetItem__listPtr_Signed_rpy_stringPtr(%RPyListOfString* %l_1, long %index_0_long, %RPyString* %newstring_0)
+    ret void
+}
+
 """
 
 def write_raise_exc(c_name, exc_repr, codewriter):



More information about the Pypy-commit mailing list