[pypy-commit] pypy arm-backend-2: make sure we get an int here

bivab noreply at buildbot.pypy.org
Mon Jan 9 11:56:39 CET 2012


Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r51156:a796398e72b0
Date: 2011-12-30 20:29 +0100
http://bitbucket.org/pypy/pypy/changeset/a796398e72b0/

Log:	make sure we get an int here

diff --git a/pypy/jit/backend/arm/codebuilder.py b/pypy/jit/backend/arm/codebuilder.py
--- a/pypy/jit/backend/arm/codebuilder.py
+++ b/pypy/jit/backend/arm/codebuilder.py
@@ -175,7 +175,8 @@
         assert target_ofs & 0x3 == 0
         self.write32(c << 28 | 0xA << 24 | (target_ofs >> 2) & 0xFFFFFF)
 
-    def BL(self, target, c=cond.AL):
+    def BL(self, addr, c=cond.AL):
+        target = rffi.cast(rffi.INT, addr)
         if c == cond.AL:
             self.ADD_ri(reg.lr.value, reg.pc.value, arch.PC_OFFSET / 2)
             self.LDR_ri(reg.pc.value, reg.pc.value, imm=-arch.PC_OFFSET / 2)


More information about the pypy-commit mailing list