Author: Armin Rigo <[email protected]>
Branch: optimize-cond-call
Changeset: r79438:7e7fea339e9c
Date: 2015-09-04 18:27 +0200
http://bitbucket.org/pypy/pypy/changeset/7e7fea339e9c/
Log: Minor refactor of int_xxx_ovf()
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
@@ -1612,17 +1612,20 @@
mc.MOV(heap(self.cpu.pos_exc_value()), tmploc)
mc.MOV(heap(self.cpu.pos_exception()), exctploc)
- genop_int_add_ovf = genop_int_add
- genop_int_sub_ovf = genop_int_sub
- genop_int_mul_ovf = genop_int_mul
+ def genop_int_add_ovf(self, op, arglocs, resloc):
+ self.genop_int_add(op, arglocs, resloc)
+ self.guard_success_cc = rx86.Conditions['NO']
- def genop_guard_guard_no_overflow(self, guard_op, guard_token, locs, ign):
+ def genop_int_sub_ovf(self, op, arglocs, resloc):
+ self.genop_int_sub(op, arglocs, resloc)
self.guard_success_cc = rx86.Conditions['NO']
- self.implement_guard(guard_token)
- def genop_guard_guard_overflow(self, guard_op, guard_token, locs, ign):
- self.guard_success_cc = rx86.Conditions['O']
- self.implement_guard(guard_token)
+ def genop_int_mul_ovf(self, op, arglocs, resloc):
+ self.genop_int_mul(op, arglocs, resloc)
+ self.guard_success_cc = rx86.Conditions['NO']
+
+ genop_guard_guard_no_overflow = genop_guard_guard_true
+ genop_guard_guard_overflow = genop_guard_guard_false
def genop_guard_guard_value(self, guard_op, guard_token, locs, ign):
if guard_op.getarg(0).type == FLOAT:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit