Author: edelsohn
Branch: ppc-jit-backend
Changeset: r51073:5227411080a8
Date: 2012-01-06 12:15 -0500
http://bitbucket.org/pypy/pypy/changeset/5227411080a8/
Log: Cast value in convert_to_imm, which fixes test_new_with_vtable.
diff --git a/pypy/jit/backend/ppc/ppcgen/regalloc.py
b/pypy/jit/backend/ppc/ppcgen/regalloc.py
--- a/pypy/jit/backend/ppc/ppcgen/regalloc.py
+++ b/pypy/jit/backend/ppc/ppcgen/regalloc.py
@@ -89,7 +89,8 @@
def convert_to_imm(self, c):
if isinstance(c, ConstInt):
- return locations.ImmLocation(c.value)
+ val = rffi.cast(lltype.Signed, c.value)
+ return locations.ImmLocation(val)
else:
assert isinstance(c, ConstPtr)
return locations.ImmLocation(rffi.cast(lltype.Signed, c.value))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit