Author: Armin Rigo <ar...@tunes.org>
Branch: emit-call-x86
Changeset: r64333:6f8665556925
Date: 2013-05-19 18:23 +0200
http://bitbucket.org/pypy/pypy/changeset/6f8665556925/

Log:    fixes

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
@@ -27,7 +27,7 @@
 
     # this can be set to guide more complex calls: gives the detailed
     # type of the arguments
-    argtypes = None
+    argtypes = []
     restype = INT
     ressize = WORD
     ressign = False
@@ -421,7 +421,7 @@
                     on_stack += 1
                 xmm_src_locs.append(loc)
                 xmm_dst_locs.append(tgt)
-            elif argtypes is not None and argtypes[i] == 'S':
+            elif i < len(argtypes) and argtypes[i] == 'S':
                 # Singlefloat argument
                 if singlefloats is None:
                     singlefloats = []
@@ -445,7 +445,7 @@
             floats = 0
             for i in range(len(arglocs)):
                 arg = arglocs[i]
-                if arg.is_float() or argtypes and argtypes[i] == 'S':
+                if arg.is_float() or (i < len(argtypes) and argtypes[i]=='S'):
                     floats += 1
             all_args = len(arglocs)
             stack_depth = (max(all_args - floats - len(self.ARGUMENTS_GPR), 0)
diff --git a/rpython/jit/backend/x86/rx86.py b/rpython/jit/backend/x86/rx86.py
--- a/rpython/jit/backend/x86/rx86.py
+++ b/rpython/jit/backend/x86/rx86.py
@@ -553,6 +553,7 @@
     CALL_l = insn('\xE8', relative(1))
     CALL_r = insn(rex_nw, '\xFF', register(1), chr(0xC0 | (2<<3)))
     CALL_b = insn('\xFF', orbyte(2<<3), stack_bp(1))
+    CALL_s = insn('\xFF', orbyte(2<<3), stack_sp(1))
 
     # XXX: Only here for testing purposes..."as" happens the encode the
     # registers in the opposite order that we would otherwise do in a
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to