[pypy-commit] pypy ppc-jit-backend: alloc SCRATCH reg in emit_getinteriorfield_gc

hager noreply at buildbot.pypy.org
Tue Feb 14 11:47:14 CET 2012


Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r52444:da57d1e43b4c
Date: 2012-02-14 11:46 +0100
http://bitbucket.org/pypy/pypy/changeset/da57d1e43b4c/

Log:	alloc SCRATCH reg in emit_getinteriorfield_gc

diff --git a/pypy/jit/backend/ppc/opassembler.py b/pypy/jit/backend/ppc/opassembler.py
--- a/pypy/jit/backend/ppc/opassembler.py
+++ b/pypy/jit/backend/ppc/opassembler.py
@@ -542,6 +542,7 @@
     def emit_getinteriorfield_gc(self, op, arglocs, regalloc):
         (base_loc, index_loc, res_loc,
             ofs_loc, ofs, itemsize, fieldsize) = arglocs
+        self.mc.alloc_scratch_reg()
         self.mc.load_imm(r.SCRATCH, itemsize.value)
         self.mc.mullw(r.SCRATCH.value, index_loc.value, r.SCRATCH.value)
         if ofs.value > 0:
@@ -560,6 +561,7 @@
             self.mc.lbzx(res_loc.value, base_loc.value, r.SCRATCH.value)
         else:
             assert 0
+        self.mc.free_scratch_reg()
 
         #XXX Hack, Hack, Hack
         if not we_are_translated():


More information about the pypy-commit mailing list