Author: David Schneider <[email protected]>
Branch: jitframe-on-heap
Changeset: r62290:9c6fa4ed86cc
Date: 2013-03-11 11:27 +0100
http://bitbucket.org/pypy/pypy/changeset/9c6fa4ed86cc/
Log: fix for build_frame_realloc_slowpath and _restore_exception
diff --git a/rpython/jit/backend/arm/assembler.py
b/rpython/jit/backend/arm/assembler.py
--- a/rpython/jit/backend/arm/assembler.py
+++ b/rpython/jit/backend/arm/assembler.py
@@ -240,11 +240,16 @@
assert excvalloc.is_reg()
self.store_reg(mc, excvalloc, r.ip)
else:
+ assert exctploc is not r.fp
# load exc_value from JITFRAME and put it in pos_exc_value
ofs = self.cpu.get_ofs_of_frame_field('jf_guard_exc')
self.load_reg(mc, tmpreg, r.fp, ofs)
self.store_reg(mc, tmpreg, r.ip)
+ # reset exc_value in the JITFRAME
+ mc.gen_load_int(tmpreg.value, 0)
+ self.store_reg(mc, tmpreg, r.fp, ofs)
+ # restore pos_exception from exctploc register
mc.gen_load_int(r.ip.value, self.cpu.pos_exception())
self.store_reg(mc, exctploc, r.ip)
@@ -796,7 +801,7 @@
# store a possibly present exception
# we use a callee saved reg here as a tmp for the exc.
- self._store_and_reset_exception(mc, None, r.fp, on_frame=True)
+ self._store_and_reset_exception(mc, None, r.r4, on_frame=True)
# call realloc_frame, it takes two arguments
# arg0: the old jitframe
@@ -804,11 +809,11 @@
#
mc.BL(self.cpu.realloc_frame)
+ # set fp to the new jitframe returned from the previous call
+ mc.MOV_rr(r.fp.value, r.r0.value)
+
# restore a possibly present exception
- self._restore_exception(mc, None, r.fp)
-
- # set fp to the new jitframe
- mc.MOV_rr(r.fp.value, r.r0.value)
+ self._restore_exception(mc, None, r.r4)
gcrootmap = self.cpu.gc_ll_descr.gcrootmap
if gcrootmap and gcrootmap.is_shadow_stack:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit