Author: Armin Rigo <[email protected]>
Branch: emit-call-x86
Changeset: r64349:8f33f01f56c5
Date: 2013-05-19 22:12 +0200
http://bitbucket.org/pypy/pypy/changeset/8f33f01f56c5/

Log:    fix

diff --git a/rpython/jit/backend/x86/assembler.py 
b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -6,7 +6,7 @@
                                                 DEBUG_COUNTER, debug_bridge)
 from rpython.jit.backend.llsupport.asmmemmgr import MachineDataBlockWrapper
 from rpython.jit.backend.llsupport.gcmap import allocate_gcmap
-from rpython.jit.metainterp.history import Const, Box
+from rpython.jit.metainterp.history import Const, Box, VOID
 from rpython.jit.metainterp.history import AbstractFailDescr, INT, REF, FLOAT
 from rpython.rtyper.lltypesystem import lltype, rffi, rstr, llmemory
 from rpython.rtyper.lltypesystem.lloperation import llop
@@ -1006,10 +1006,16 @@
     def simple_call(self, fnloc, arglocs, result_loc=eax):
         if result_loc is xmm0:
             result_type = FLOAT
+            result_size = 8
+        elif result_loc is None:
+            result_type = VOID
+            result_size = 0
         else:
             result_type = INT
+            result_size = WORD
         cb = callbuilder.CallBuilder(self, fnloc, arglocs,
-                                     result_loc, result_type)
+                                     result_loc, result_type,
+                                     result_size)
         cb.emit()
 
     def simple_call_no_collect(self, fnloc, arglocs):
diff --git a/rpython/jit/backend/x86/callbuilder.py 
b/rpython/jit/backend/x86/callbuilder.py
--- a/rpython/jit/backend/x86/callbuilder.py
+++ b/rpython/jit/backend/x86/callbuilder.py
@@ -28,7 +28,6 @@
     # this can be set to guide more complex calls: gives the detailed
     # type of the arguments
     argtypes = []
-    ressize = WORD
     ressign = False
 
     # this is the calling convention (can be FFI_STDCALL on Windows)
@@ -41,7 +40,8 @@
     tmpresloc = None
 
 
-    def __init__(self, assembler, fnloc, arglocs, resloc=eax, restype=INT):
+    def __init__(self, assembler, fnloc, arglocs,
+                 resloc=eax, restype=INT, ressize=WORD):
         # Avoid tons of issues with a non-immediate fnloc by sticking it
         # as an extra argument if needed
         self.fnloc_is_immediate = isinstance(fnloc, ImmedLoc)
@@ -54,6 +54,7 @@
         self.mc = assembler.mc
         self.resloc = resloc
         self.restype = restype
+        self.ressize = ressize
         self.current_esp = 0
 
     def emit_no_collect(self):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to