[pypy-commit] pypy s390x-backend: removed double stack frame allocation from stacklet, zpickle requiring them pass
plan_rich
pypy.commits at gmail.com
Mon Jan 18 04:09:08 EST 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch: s390x-backend
Changeset: r81830:737d6e63553a
Date: 2016-01-18 10:07 +0100
http://bitbucket.org/pypy/pypy/changeset/737d6e63553a/
Log: removed double stack frame allocation from stacklet, zpickle
requiring them pass
diff --git a/rpython/rlib/constant.py b/rpython/rlib/constant.py
--- a/rpython/rlib/constant.py
+++ b/rpython/rlib/constant.py
@@ -11,7 +11,6 @@
DBL_MIN = rffi_platform.DefinedConstantDouble('DBL_MIN')
DBL_MANT_DIG = rffi_platform.ConstantInteger('DBL_MANT_DIG')
-
for k, v in rffi_platform.configure(CConfig).items():
assert v is not None, "no value found for %r" % k
globals()[k] = v
diff --git a/rpython/translator/c/src/stacklet/switch_s390x_gcc.h b/rpython/translator/c/src/stacklet/switch_s390x_gcc.h
--- a/rpython/translator/c/src/stacklet/switch_s390x_gcc.h
+++ b/rpython/translator/c/src/stacklet/switch_s390x_gcc.h
@@ -7,16 +7,8 @@
{
void *result;
__asm__ volatile (
- /* By Vaibhav Sood & Armin Rigo, with some copying from
- the Stackless version by Kristjan Valur Jonsson */
-
- /* Save all 18 volatile GP registers, 18 volatile FP regs, and 12
- volatile vector regs. We need a stack frame of 144 bytes for FPR,
- 144 bytes for GPR, 192 bytes for VR plus 48 bytes for the standard
- stackframe = 528 bytes (a multiple of 16). */
-
- //"mflr 0\n" /* Save LR into 16(r1) */
- //"stg 0, 16(1)\n"
+ /* The Stackless version by Kristjan Valur Jonsson,
+ ported to s390x by Richard Plangger */
"stmg 6,15,48(15)\n"
@@ -25,17 +17,15 @@
"std 4,144(15)\n"
"std 6,152(15)\n"
- "lay 15,-160(15)\n" /* Create stack frame */
-
"lgr 10, %[restore_state]\n" /* save 'restore_state' for later */
"lgr 11, %[extra]\n" /* save 'extra' for later */
"lgr 14, %[save_state]\n" /* move 'save_state' into r14 for branching */
"lgr 2, 15\n" /* arg 1: current (old) stack pointer */
"lgr 3, 11\n" /* arg 2: extra */
- "lay 15, -160(15)\n" /* create temp stack space (see below) */
+ "lay 15,-160(15)\n" /* create stack frame */
"basr 14, 14\n" /* call save_state() */
- "lay 15, 160(15)\n" /* destroy temp stack space */
+ "lay 15, 160(15)\n" /* destroy stack frame */
"cgij 2, 0, 8, zero\n" /* skip the rest if the return value is null */
More information about the pypy-commit
mailing list