Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r56778:673ee11077e8 Date: 2012-08-21 19:29 +0200 http://bitbucket.org/pypy/pypy/changeset/673ee11077e8/
Log: Fixes for the two previous problems. 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 @@ -1171,11 +1171,13 @@ xmm_dst_locs.append(unused_xmm.pop()) else: pass_on_stack.append(loc) - elif (argtypes is not None and argtypes[i-start] == 'S' and - len(unused_xmm) > 0): + elif argtypes is not None and argtypes[i-start] == 'S': # Singlefloat argument - if singlefloats is None: singlefloats = [] - singlefloats.append((loc, unused_xmm.pop())) + if len(unused_xmm) > 0: + if singlefloats is None: singlefloats = [] + singlefloats.append((loc, unused_xmm.pop())) + else: + pass_on_stack.append(loc) else: if len(unused_gpr) > 0: src_locs.append(loc) @@ -1209,6 +1211,9 @@ # Load the singlefloat arguments from main regs or stack to xmm regs if singlefloats is not None: for src, dst in singlefloats: + if isinstance(src, ImmedLoc): + self.mc.MOV(X86_64_SCRATCH_REG, src) + src = X86_64_SCRATCH_REG self.mc.MOVD(dst, src) # Finally remap the arguments in the main regs # If x is a register and is in dst_locs, then oups, it needs to _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit