Author: Richard Plangger <[email protected]>
Branch: s390x-backend
Changeset: r81879:eb2fcf893ee0
Date: 2016-01-20 15:05 +0100
http://bitbucket.org/pypy/pypy/changeset/eb2fcf893ee0/
Log: fixed a pool issue where a guard token did not receive it's rightful
pool position
diff --git a/rpython/jit/backend/test/zll_stress.py
b/rpython/jit/backend/test/zll_stress.py
--- a/rpython/jit/backend/test/zll_stress.py
+++ b/rpython/jit/backend/test/zll_stress.py
@@ -19,4 +19,5 @@
r = Random()
r.jumpahead(piece*99999999)
for i in range(piece*per_piece, (piece+1)*per_piece):
+ print " i = %d; r.setstate(%s)" % (i, r.getstate())
check_random_function(cpu, LLtypeOperationBuilder, r, i,
total_iterations)
diff --git a/rpython/jit/backend/zarch/assembler.py
b/rpython/jit/backend/zarch/assembler.py
--- a/rpython/jit/backend/zarch/assembler.py
+++ b/rpython/jit/backend/zarch/assembler.py
@@ -132,7 +132,7 @@
fail_descr, target = self.store_info_on_descr(startpos, guardtok)
assert target != 0
pool_offset = guardtok._pool_offset
-
+ assert pool_offset != -1
# overwrite the gcmap in the jitframe
offset = pool_offset + RECOVERY_GCMAP_POOL_OFFSET
diff --git a/rpython/jit/backend/zarch/opassembler.py
b/rpython/jit/backend/zarch/opassembler.py
--- a/rpython/jit/backend/zarch/opassembler.py
+++ b/rpython/jit/backend/zarch/opassembler.py
@@ -641,6 +641,7 @@
token = ZARCHGuardToken(self.cpu, gcmap, descr, op.getfailargs(),
arglocs, op.getopnum(), frame_depth,
fcond)
+ token._pool_offset = self.pool.get_descr_offset(descr)
return token
def emit_guard_true(self, op, arglocs, regalloc):
diff --git a/rpython/jit/backend/zarch/pool.py
b/rpython/jit/backend/zarch/pool.py
--- a/rpython/jit/backend/zarch/pool.py
+++ b/rpython/jit/backend/zarch/pool.py
@@ -125,7 +125,7 @@
self.constant_64_zeros = -1
self.constant_64_ones = -1
self.constant_64_sign_bit = -1
- self.constant_max_64_positive -1
+ self.constant_max_64_positive = -1
def check_size(self, size=-1):
if size == -1:
@@ -190,6 +190,7 @@
def overwrite_64(self, mc, index, value):
index += self.pool_start
+
mc.overwrite(index, chr(value >> 56 & 0xff))
mc.overwrite(index+1, chr(value >> 48 & 0xff))
mc.overwrite(index+2, chr(value >> 40 & 0xff))
@@ -209,6 +210,6 @@
offset = self.offset_descr[descr]
assert isinstance(offset, int)
assert offset >= 0
- guard_token._pool_offset = offset
+ assert guard_token._pool_offset != -1
ptr = rffi.cast(lltype.Signed, guard_token.gcmap)
self.overwrite_64(mc, offset + RECOVERY_GCMAP_POOL_OFFSET, ptr)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit