Author: Richard Plangger <planri...@gmail.com>
Branch: s390x-backend
Changeset: r82086:e108cd4706e3
Date: 2016-02-05 14:59 +0100
http://bitbucket.org/pypy/pypy/changeset/e108cd4706e3/

Log:    backchain was not correct (now it is, tested it), flush_cc must
        write 1, it must not be something != 1

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
@@ -758,7 +758,7 @@
             # sadly we cannot use LOCGHI
             # it is included in some extension that seem to be NOT installed
             # by default.
-            self.mc.LGHI(result_loc, l.imm(-1))
+            self.mc.LGHI(result_loc, l.imm(1))
             off = self.mc.XGR_byte_count + self.mc.BRC_byte_count
             self.mc.BRC(condition, l.imm(off)) # branch over XGR
             self.mc.XGR(result_loc, result_loc)
@@ -776,7 +776,7 @@
             self.mc.LAY(r.SP, l.addr(STD_FRAME_SIZE_IN_BYTES, r.SP))
         self.mc.BCR(c.ANY, r.RETURN)
 
-        currpos = self.mc.currpos()
+        curpos = self.mc.currpos()
         pmc = OverwritingBuilder(self.mc, jmp_pos, 1)
         pmc.CGIJ(r.r2, l.imm(0), c.EQ, l.imm(curpos - jmp_pos))
         pmc.overwrite()
@@ -1025,6 +1025,7 @@
         if gcrootmap and gcrootmap.is_shadow_stack:
             self._call_header_shadowstack(gcrootmap)
 
+
     def _call_header_shadowstack(self, gcrootmap):
         # we need to put one word into the shadowstack: the jitframe (SPP)
         # we saved all registers to the stack
diff --git a/rpython/jit/backend/zarch/codebuilder.py 
b/rpython/jit/backend/zarch/codebuilder.py
--- a/rpython/jit/backend/zarch/codebuilder.py
+++ b/rpython/jit/backend/zarch/codebuilder.py
@@ -219,7 +219,7 @@
 
     def push_std_frame(self, additional_bytes=0):
         off = (STD_FRAME_SIZE_IN_BYTES + additional_bytes)
-        self.STG(r.SP, l.addr(off, r.SP))
+        self.STG(r.SP, l.addr(-off, r.SP))
         self.LAY(r.SP, l.addr(-off, r.SP))
 
     def pop_std_frame(self, additional_bytes=0):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to