[pypy-svn] r40755 - pypy/dist/pypy/jit/codegen/i386
arigo at codespeak.net
arigo at codespeak.net
Mon Mar 19 11:45:58 CET 2007
Author: arigo
Date: Mon Mar 19 11:45:56 2007
New Revision: 40755
Modified:
pypy/dist/pypy/jit/codegen/i386/operation.py
Log:
- a simpler implementation of int_abs_ovf
- bug fix
Modified: pypy/dist/pypy/jit/codegen/i386/operation.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/operation.py (original)
+++ pypy/dist/pypy/jit/codegen/i386/operation.py Mon Mar 19 11:45:56 2007
@@ -59,8 +59,9 @@
emit = staticmethod(I386CodeBuilder.NOT)
class OpIntAbs(Op1):
- opname = 'int_abs'
+ opname = 'int_abs', 'int_abs_ovf'
side_effects = False
+ ccexcflag = Conditions['L']
def mark_used_vars(self, allocator):
allocator.using(self.x)
def generate(self, allocator):
@@ -77,14 +78,6 @@
mc.XOR(dstop, tmpop)
allocator.end_clobber(tmpop)
-class OpIntAbsOvf(OpIntAbs):
- opname = 'int_abs_ovf'
- ccexcflag = Conditions['E']
- def generate(self, allocator):
- OpIntAbs.generate(self, allocator)
- mc = allocator.mc
- mc.CMP(allocator.var2loc[self], imm(-sys.maxint-1))
-
class OpSameAs(Op1):
clobbers_cc = False # special handling of the cc
side_effects = False
@@ -1015,7 +1008,7 @@
load_into_cc_ge = load_into_cc_eq
ccflag_o = CCFLAG('O', load_into_cc_o)
-ccflag_no = CCFLAG('O', load_into_cc_no)
+ccflag_no = CCFLAG('NO', load_into_cc_no)
ccflag_lt = CCFLAG('L', load_into_cc_lt)
ccflag_le = CCFLAG('LE', load_into_cc_le)
More information about the Pypy-commit
mailing list