Author: Maciej Fijalkowski <[email protected]>
Branch: fast-slowpath
Changeset: r65372:5085a0267092
Date: 2013-07-12 15:18 +0200
http://bitbucket.org/pypy/pypy/changeset/5085a0267092/
Log: woot, make the first test pass
diff --git a/rpython/jit/backend/test/runner_test.py
b/rpython/jit/backend/test/runner_test.py
--- a/rpython/jit/backend/test/runner_test.py
+++ b/rpython/jit/backend/test/runner_test.py
@@ -2293,7 +2293,6 @@
assert self.cpu.get_int_value(frame, i) == i
assert self.cpu.get_float_value(frame, 6) == 1.2
assert self.cpu.get_float_value(frame, 7) == 3.4
- xxx
frame = self.cpu.execute_token(looptoken, 1, 1, 1, 2, 3, 4, 5, 1.2,
3.4)
assert called == [1]
for i in range(4):
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
@@ -159,12 +159,12 @@
assert no_args == 1
mc.SUB(esp, imm(WORD))
# first arg is always in edi
- mc.CALL(imm(0))
+ mc.CALL(eax)
mc.ADD(esp, imm(WORD))
self._pop_all_regs_from_frame(mc, [], self.cpu.supports_floats,
callee_only=False)
mc.RET()
- return 0
+ return mc.materialize(self.cpu.asmmemmgr, [])
def _build_malloc_slowpath(self, kind):
""" While arriving on slowpath, we have a gcpattern on stack 0.
@@ -2142,7 +2142,7 @@
self._check_frame_depth_debug(self.mc)
def cond_call(self, op, gcmap, cond_loc, call_loc, arglocs):
- self.mc.CMP(cond_loc, cond_loc)
+ self.mc.TEST(cond_loc, cond_loc)
self.mc.J_il8(rx86.Conditions['Z'], 0) # patched later
jmp_adr = self.mc.get_relative_pos()
self.push_gcmap(self.mc, gcmap, mov=True)
diff --git a/rpython/jit/backend/x86/regalloc.py
b/rpython/jit/backend/x86/regalloc.py
--- a/rpython/jit/backend/x86/regalloc.py
+++ b/rpython/jit/backend/x86/regalloc.py
@@ -802,8 +802,8 @@
args = op.getarglist()
assert len(args) == 1 + 2
self.make_sure_var_in_reg(args[2], selected_reg=edi)
+ loc_call = self.make_sure_var_in_reg(args[1], args, selected_reg=eax)
loc_cond = self.make_sure_var_in_reg(args[0], args)
- loc_call = self.make_sure_var_in_reg(args[1], args)
self.assembler.cond_call(op, self.get_gcmap(), loc_cond, loc_call,
[edi])
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit