Author: hager <sven.ha...@uni-duesseldorf.de> Branch: ppc-jit-backend Changeset: r48307:28ec327820ce Date: 2011-10-21 11:52 +0200 http://bitbucket.org/pypy/pypy/changeset/28ec327820ce/
Log: (bivab, hager): Implemented GUARD_FALSE. diff --git a/pypy/jit/backend/ppc/ppcgen/opassembler.py b/pypy/jit/backend/ppc/ppcgen/opassembler.py --- a/pypy/jit/backend/ppc/ppcgen/opassembler.py +++ b/pypy/jit/backend/ppc/ppcgen/opassembler.py @@ -174,6 +174,12 @@ # # ^^^^ If this condition is met, # # then the guard fails. + def emit_guard_false(self, op, arglocs, regalloc): + l0 = arglocs[0] + failargs = arglocs[1:] + self.mc.cmpi(l0.value, 0) + self._emit_guard(op, failargs, c.NE) + # TODO - Evaluate whether this can be done with # SO bit instead of OV bit => usage of CR # instead of XER could be more efficient diff --git a/pypy/jit/backend/ppc/ppcgen/regalloc.py b/pypy/jit/backend/ppc/ppcgen/regalloc.py --- a/pypy/jit/backend/ppc/ppcgen/regalloc.py +++ b/pypy/jit/backend/ppc/ppcgen/regalloc.py @@ -269,6 +269,8 @@ self.possibly_free_vars(op.getfailargs()) return args + prepare_guard_false = prepare_guard_true + def prepare_guard_no_overflow(self, op): locs = self._prepare_guard(op) self.possibly_free_vars(op.getfailargs()) _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit