Author: Richard Plangger <[email protected]>
Branch: s390x-backend
Changeset: r81948:acf6ac9d0d3d
Date: 2016-01-26 14:01 +0100
http://bitbucket.org/pypy/pypy/changeset/acf6ac9d0d3d/
Log: gotcha, guard nonnull class was implemented incorrectly (substracted
value that should have been shifted 16 bits to the left)
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
@@ -542,7 +542,6 @@
mc.restore_link()
# So we return to our caller, conditionally if "EQ"
mc.BCR(c.EQ, r.r14)
- mc.trap() # debug if this is EVER executed!
#
# Else, jump to propagate_exception_path
assert self.propagate_exception_path
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
@@ -682,11 +682,10 @@
def emit_guard_nonnull_class(self, op, arglocs, regalloc):
self.mc.cmp_op(arglocs[0], l.imm(1), imm=True, signed=False)
patch_pos = self.mc.currpos()
- self.mc.trap()
- self.mc.write('\x00' * 4)
+ self.mc.reserve_cond_jump(short=True)
self._cmp_guard_class(op, arglocs, regalloc)
pmc = OverwritingBuilder(self.mc, patch_pos, 1)
- pmc.BRCL(c.LT, l.imm(self.mc.currpos() - patch_pos))
+ pmc.BRC(c.LT, l.imm(self.mc.currpos() - patch_pos))
pmc.overwrite()
self.guard_success_cc = c.EQ
self._emit_guard(op, arglocs[2:])
@@ -716,6 +715,7 @@
def _cmp_guard_gc_type(self, loc_ptr, expected_typeid):
self._read_typeid(r.SCRATCH2, loc_ptr)
assert 0 <= expected_typeid <= 0x7fffffff # 4 bytes are always enough
+ # we can handle 4 byte compare immediate
self.mc.cmp_op(r.SCRATCH2, l.imm(expected_typeid),
imm=True, signed=False)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit