[pypy-commit] pypy ppc-jit-backend: Fixed bug in load_from_addr. It did not do the intended stuff when called with r0.

hager noreply at buildbot.pypy.org
Thu Oct 20 12:43:43 CEST 2011


Author: hager <sven.hager at uni-duesseldorf.de>
Branch: ppc-jit-backend
Changeset: r48259:440b9131acbf
Date: 2011-10-20 12:38 +0200
http://bitbucket.org/pypy/pypy/changeset/440b9131acbf/

Log:	Fixed bug in load_from_addr. It did not do the intended stuff when
	called with r0.

diff --git a/pypy/jit/backend/ppc/ppcgen/codebuilder.py b/pypy/jit/backend/ppc/ppcgen/codebuilder.py
--- a/pypy/jit/backend/ppc/ppcgen/codebuilder.py
+++ b/pypy/jit/backend/ppc/ppcgen/codebuilder.py
@@ -951,8 +951,8 @@
 
     def load_from_addr(self, rD, addr):
         if IS_PPC_32:
-            self.addis(rD, 0, ha(addr))
-            self.lwz(rD, rD, la(addr))
+            self.load_imm(rD, addr)
+            self.lwzx(rD.value, 0, rD.value)
         else:
             self.load_word(rD, addr)
             self.ld(rD, rD, 0)


More information about the pypy-commit mailing list