Author: Richard Plangger <planri...@gmail.com> Branch: Changeset: r85026:8d195daa0502 Date: 2016-06-08 10:47 +0200 http://bitbucket.org/pypy/pypy/changeset/8d195daa0502/
Log: printing random seed in test (test_runner), more tightly packing the stack when calling with release gil (removes 2 WORDs) diff --git a/rpython/jit/backend/test/runner_test.py b/rpython/jit/backend/test/runner_test.py --- a/rpython/jit/backend/test/runner_test.py +++ b/rpython/jit/backend/test/runner_test.py @@ -2825,6 +2825,7 @@ from rpython.rlib.rarithmetic import r_singlefloat from rpython.translator.c import primitive + def same_as_for_box(b): if b.type == 'i': return rop.SAME_AS_I @@ -2835,6 +2836,8 @@ cpu = self.cpu rnd = random.Random(525) + seed = py.test.config.option.randomseed + print("random seed %d" % seed) ALL_TYPES = [ (types.ulong, lltype.Unsigned), diff --git a/rpython/jit/backend/zarch/callbuilder.py b/rpython/jit/backend/zarch/callbuilder.py --- a/rpython/jit/backend/zarch/callbuilder.py +++ b/rpython/jit/backend/zarch/callbuilder.py @@ -12,6 +12,8 @@ from rpython.rtyper.lltypesystem import rffi from rpython.jit.backend.llsupport.descr import CallDescr +CALL_RELEASE_GIL_STACK_OFF = 6*WORD + class CallBuilder(AbstractCallBuilder): GPR_ARGS = [r.r2, r.r3, r.r4, r.r5, r.r6] FPR_ARGS = [r.f0, r.f2, r.f4, r.f6] @@ -85,8 +87,8 @@ self.subtracted_to_sp += len(stack_params) * WORD base = len(stack_params) * WORD if self.is_call_release_gil: - self.subtracted_to_sp += 8*WORD - base += 8*WORD + self.subtracted_to_sp += CALL_RELEASE_GIL_STACK_OFF + base += CALL_RELEASE_GIL_STACK_OFF for idx,i in enumerate(stack_params): loc = arglocs[i] offset = STD_FRAME_SIZE_IN_BYTES - base + 8 * idx @@ -187,7 +189,7 @@ RSHADOWPTR = self.RSHADOWPTR RFASTGILPTR = self.RFASTGILPTR # - pos = STD_FRAME_SIZE_IN_BYTES - 7*WORD + pos = STD_FRAME_SIZE_IN_BYTES - CALL_RELEASE_GIL_STACK_OFF self.mc.STMG(r.r8, r.r13, l.addr(pos, r.SP)) # # Save this thread's shadowstack pointer into r8, for later comparison @@ -286,7 +288,7 @@ if gcrootmap: if gcrootmap.is_shadow_stack and self.is_call_release_gil: self.mc.LGR(r.SCRATCH, RSHADOWOLD) - pos = STD_FRAME_SIZE_IN_BYTES - 7*WORD + pos = STD_FRAME_SIZE_IN_BYTES - CALL_RELEASE_GIL_STACK_OFF self.mc.LMG(r.r8, r.r13, l.addr(pos, r.SP)) def write_real_errno(self, save_err): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit