[pypy-svn] pypy arm-backend-2: Remove guard code emitted twice in guard_nonnull_class and move position of patched location for brigdes

bivab commits-noreply at bitbucket.org
Thu Dec 30 19:45:14 CET 2010


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r40293:6bf5c11938ea
Date: 2010-12-30 16:28 +0100
http://bitbucket.org/pypy/pypy/changeset/6bf5c11938ea/

Log:	Remove guard code emitted twice in guard_nonnull_class and move
	position of patched location for brigdes

diff --git a/pypy/jit/backend/arm/opassembler.py b/pypy/jit/backend/arm/opassembler.py
--- a/pypy/jit/backend/arm/opassembler.py
+++ b/pypy/jit/backend/arm/opassembler.py
@@ -141,8 +141,8 @@
            print 'Failargs: ', op.getfailargs()
 
         self.mc.ADD_ri(r.pc.value, r.pc.value, self.guard_size-PC_OFFSET, cond=fcond)
+        descr._arm_guard_pos = self.mc.currpos()
         self.mc.PUSH([reg.value for reg in r.caller_resp])
-        descr._arm_guard_pos = self.mc.currpos()
         addr = self.cpu.get_on_leave_jitted_int(save_exception=save_exc)
         self.mc.BL(addr)
         self.mc.POP([reg.value for reg in r.caller_resp])
@@ -218,10 +218,6 @@
         return self._emit_guard(op, locs[3:], c.EQ)
 
 
-        return self._emit_guard(op, locs[2:], c.EQ)
-
-
-
 class OpAssembler(object):
 
     _mixin_ = True


More information about the Pypy-commit mailing list