[pypy-commit] pypy ppc-jit-backend: Ensure exclusive usage of r0

hager noreply at buildbot.pypy.org
Wed Nov 30 18:04:14 CET 2011


Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r50021:97cfa93958c4
Date: 2011-11-30 17:56 +0100
http://bitbucket.org/pypy/pypy/changeset/97cfa93958c4/

Log:	Ensure exclusive usage of r0

diff --git a/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py b/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py
--- a/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py
+++ b/pypy/jit/backend/ppc/ppcgen/ppc_assembler.py
@@ -802,11 +802,13 @@
         memaddr = self.gen_descr_encoding(descr, args, arglocs)
 
         # store addr in force index field
+        self.mc.alloc_scratch_reg()
         self.mc.load_imm(r.r0, memaddr)
         if IS_PPC_32:
             self.mc.stw(r.r0.value, r.SPP.value, 0)
         else:
             self.mc.std(r.r0.value, r.SPP.value, 0)
+        self.mc.free_scratch_reg()
 
         if save_exc:
             path = self._leave_jitted_hook_save_exc


More information about the pypy-commit mailing list