[pypy-svn] r63604 - pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86
fijal at codespeak.net
fijal at codespeak.net
Sat Apr 4 02:48:46 CEST 2009
Author: fijal
Date: Sat Apr 4 02:48:45 2009
New Revision: 63604
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py
pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py
Log:
guard_value
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py Sat Apr 4 02:48:45 2009
@@ -567,16 +567,14 @@
self.mc.MOV(resloc, addr_add(imm(self._exception_addr), imm(WORD)))
self.mc.MOV(heap(self._exception_addr), imm(0))
- def genop_discard_guard_false(self, op, locs):
+ def genop_guard_guard_false(self, op, ign_1, addr, locs, ign_2):
loc = locs[0]
self.mc.TEST(loc, loc)
- self.implement_guard(op, self.mc.JNZ, locs[1:])
+ self.implement_guard(addr, op, self.mc.JNZ)
- def genop_discard_guard_value(self, op, locs):
- arg0 = locs[0]
- arg1 = locs[1]
- self.mc.CMP(arg0, arg1)
- self.implement_guard(op, self.mc.JNE, locs[2:])
+ def genop_guard_guard_value(self, op, ign_1, addr, locs, ign_2):
+ self.mc.CMP(locs[0], locs[1])
+ self.implement_guard(addr, op, self.mc.JNE)
def genop_discard_guard_class(self, op, locs):
offset = 0 # XXX for now, the vtable ptr is at the start of the obj
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py Sat Apr 4 02:48:45 2009
@@ -634,9 +634,10 @@
if not (isinstance(x, REG) or isinstance(op.args[1], Const)):
x = self.make_sure_var_in_reg(op.args[0], [], imm_fine=False)
y = self.loc(op.args[1])
- locs = self._locs_from_liveboxes(op)
- self.eventually_free_vars(op.liveboxes + op.args)
- self.PerformDiscard(op, [x, y] + locs)
+ regalloc = self.regalloc_for_guard(op)
+ self.perform_guard(op, regalloc, [x, y], None)
+ self.eventually_free_vars(op.inputargs)
+ self.eventually_free_vars(op.args)
def consider_guard_class(self, op, ignored):
x = self.make_sure_var_in_reg(op.args[0], [], imm_fine=False)
More information about the Pypy-commit
mailing list