[pypy-svn] pypy jit-longlong: Fix test_basic in the x86 backend by supporting calls
arigo
commits-noreply at bitbucket.org
Fri Jan 7 16:00:25 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: jit-longlong
Changeset: r40454:66503f4010bb
Date: 2011-01-07 16:00 +0100
http://bitbucket.org/pypy/pypy/changeset/66503f4010bb/
Log: Fix test_basic in the x86 backend by supporting calls that return a
long long in eax+edx.
diff --git a/pypy/jit/backend/x86/assembler.py b/pypy/jit/backend/x86/assembler.py
--- a/pypy/jit/backend/x86/assembler.py
+++ b/pypy/jit/backend/x86/assembler.py
@@ -1698,7 +1698,13 @@
self._emit_call(x, arglocs, 3, tmp=tmp)
if IS_X86_32 and isinstance(resloc, StackLoc) and resloc.width == 8:
- self.mc.FSTP_b(resloc.value) # float return
+ # a float or a long long return
+ from pypy.jit.backend.llsupport.descr import LongLongCallDescr
+ if isinstance(op.getdescr(), LongLongCallDescr):
+ self.mc.MOV_br(resloc.value, eax.value) # long long
+ self.mc.MOV_br(resloc.value + 4, edx.value)
+ else:
+ self.mc.FSTP_b(resloc.value) # float return
elif size == WORD:
assert resloc is eax or resloc is xmm0 # a full word
elif size == 0:
More information about the Pypy-commit
mailing list