[pypy-svn] r63603 - pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86
fijal at codespeak.net
fijal at codespeak.net
Sat Apr 4 02:44:48 CEST 2009
Author: fijal
Date: Sat Apr 4 02:44:47 2009
New Revision: 63603
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/assembler.py
pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py
Log:
implement binop_ovf
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:44:47 2009
@@ -628,7 +628,7 @@
ovf_error_instance = self.cpu.cast_adr_to_int(self._ovf_error_inst)
self.mc.MOV(eax, imm(ovf_error_instance))
self.mc.MOV(addr_add(imm(self._exception_bck_addr), imm(WORD)),eax)
- if op.exc:
+ elif op.exc:
self.mc.MOV(eax, heap(self._exception_addr))
self.mc.MOV(heap(self._exception_bck_addr), eax)
self.mc.MOV(eax, addr_add(imm(self._exception_addr), imm(WORD)))
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:44:47 2009
@@ -675,11 +675,12 @@
def _consider_binop_ovf(self, op, guard_op):
loc, argloc = self._consider_binop_part(op, None)
- locs = self._locs_from_liveboxes(guard_op)
self.position += 1
- self.eventually_free_vars(guard_op.liveboxes)
+ regalloc = self.regalloc_for_guard(guard_op)
+ self.perform_with_guard(op, guard_op, regalloc, [loc, argloc], loc,
+ overflow=True)
+ self.eventually_free_vars(guard_op.inputargs)
self.eventually_free_var(guard_op.result)
- self.PerformWithGuard(op, guard_op, [loc, argloc] + locs, loc)
consider_int_mul_ovf = _consider_binop_ovf
consider_int_sub_ovf = _consider_binop_ovf
More information about the Pypy-commit
mailing list