From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6853C13835A for ; Mon, 5 Oct 2020 01:15:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 78E82E0817; Mon, 5 Oct 2020 01:15:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 52181E0817 for ; Mon, 5 Oct 2020 01:15:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BF167335CD8 for ; Mon, 5 Oct 2020 01:15:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3663A38C for ; Mon, 5 Oct 2020 01:15:19 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1601860293.b7f0b35fe999748b088df5dd168e8b8fad7b2ff2.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3-exe/, dev-python/pypy3-exe/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pypy3-exe/files/pypy3-7.3.2-ppc64-segfault.patch dev-python/pypy3-exe/pypy3-exe-7.3.2-r1.ebuild dev-python/pypy3-exe/pypy3-exe-7.3.2_p37-r1.ebuild X-VCS-Directories: dev-python/pypy3-exe/ dev-python/pypy3-exe/files/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: b7f0b35fe999748b088df5dd168e8b8fad7b2ff2 X-VCS-Branch: master Date: Mon, 5 Oct 2020 01:15:19 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b40c12c9-4132-4961-8481-10b15c84d8cc X-Archives-Hash: 72579eed26603d335fe095182a341082 commit: b7f0b35fe999748b088df5dd168e8b8fad7b2ff2 Author: Georgy Yakovlev gentoo org> AuthorDate: Mon Oct 5 00:37:29 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Mon Oct 5 01:11:33 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7f0b35f dev-python/pypy3-exe: backport ppc64 patch to 3.7.2 Patches already upstream, fixes segfault on ppc64 https://foss.heptapod.net/pypy/pypy/-/issues/3309 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Georgy Yakovlev gentoo.org> .../files/pypy3-7.3.2-ppc64-segfault.patch | 64 ++++++++++++++++++++++ dev-python/pypy3-exe/pypy3-exe-7.3.2-r1.ebuild | 1 + dev-python/pypy3-exe/pypy3-exe-7.3.2_p37-r1.ebuild | 1 + 3 files changed, 66 insertions(+) diff --git a/dev-python/pypy3-exe/files/pypy3-7.3.2-ppc64-segfault.patch b/dev-python/pypy3-exe/files/pypy3-7.3.2-ppc64-segfault.patch new file mode 100644 index 00000000000..c143a3765cd --- /dev/null +++ b/dev-python/pypy3-exe/files/pypy3-7.3.2-ppc64-segfault.patch @@ -0,0 +1,64 @@ +From 913e0dae8ac7ce8219a5f31126fee8a794cc314c Mon Sep 17 00:00:00 2001 +From: Armin Rigo +Date: Sat, 26 Sep 2020 09:26:24 +0200 +Subject: [PATCH] oops, fix for test_gc_indexed_box_plus_large_offset + +--- + rpython/jit/backend/ppc/opassembler.py | 16 +++++++++++----- + rpython/jit/backend/ppc/regalloc.py | 4 ++-- + 2 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/rpython/jit/backend/ppc/opassembler.py b/rpython/jit/backend/ppc/opassembler.py +index b79b18e530..4bbfbba93a 100644 +--- a/rpython/jit/backend/ppc/opassembler.py ++++ b/rpython/jit/backend/ppc/opassembler.py +@@ -755,13 +755,19 @@ class FieldOpAssembler(object): + def _apply_offset(self, index_loc, ofs_loc): + # If offset != 0 then we have to add it here. Note that + # mc.addi() would not be valid with operand r0. +- assert ofs_loc.is_imm() # must be an immediate... +- assert _check_imm_arg(ofs_loc.getint()) # ...that fits 16 bits + assert index_loc.is_core_reg() + assert index_loc is not r.SCRATCH2 +- # (simplified version of _apply_scale()) +- if ofs_loc.value > 0: +- self.mc.addi(r.SCRATCH2.value, index_loc.value, ofs_loc.value) ++ if ofs_loc.is_imm(): ++ # if it is an immediate, it must fit into 16 bits ++ assert _check_imm_arg(ofs_loc.getint()) ++ # (simplified version of _apply_scale()) ++ if ofs_loc.value != 0: ++ self.mc.addi(r.SCRATCH2.value, index_loc.value, ofs_loc.value) ++ index_loc = r.SCRATCH2 ++ else: ++ # larger immediates are loaded into a register in regalloc.py ++ assert ofs_loc.is_core_reg() ++ self.mc.add(r.SCRATCH2.value, index_loc.value, ofs_loc.value) + index_loc = r.SCRATCH2 + return index_loc + +diff --git a/rpython/jit/backend/ppc/regalloc.py b/rpython/jit/backend/ppc/regalloc.py +index f3ee1129e4..827953cf12 100644 +--- a/rpython/jit/backend/ppc/regalloc.py ++++ b/rpython/jit/backend/ppc/regalloc.py +@@ -771,7 +771,7 @@ class Regalloc(BaseRegalloc, VectorRegalloc): + value_loc = self.ensure_reg(op.getarg(2)) + assert op.getarg(3).getint() == 1 # scale + ofs_loc = self.ensure_reg_or_16bit_imm(op.getarg(4)) +- assert ofs_loc.is_imm() # the arg(4) should always be a small constant ++ # the arg(4) is often a small constant, but it may be too large + size_loc = self.ensure_reg_or_any_imm(op.getarg(5)) + return [base_loc, index_loc, value_loc, ofs_loc, size_loc] + +@@ -780,7 +780,7 @@ class Regalloc(BaseRegalloc, VectorRegalloc): + index_loc = self.ensure_reg(op.getarg(1)) + assert op.getarg(2).getint() == 1 # scale + ofs_loc = self.ensure_reg_or_16bit_imm(op.getarg(3)) +- assert ofs_loc.is_imm() # the arg(3) should always be a small constant ++ # the arg(3) is often a small constant, but it may be too large + self.free_op_vars() + res_loc = self.force_allocate_reg(op) + size_box = op.getarg(4) +-- +GitLab + diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.2-r1.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.2-r1.ebuild index 73313264113..26077ca69aa 100644 --- a/dev-python/pypy3-exe/pypy3-exe-7.3.2-r1.ebuild +++ b/dev-python/pypy3-exe/pypy3-exe-7.3.2-r1.ebuild @@ -37,6 +37,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/pypy3-7.3.2-sethostname-bytes.patch + "${FILESDIR}"/pypy3-7.3.2-ppc64-segfault.patch ) check_env() { diff --git a/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37-r1.ebuild b/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37-r1.ebuild index 592f395defc..4fe37f8704e 100644 --- a/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37-r1.ebuild +++ b/dev-python/pypy3-exe/pypy3-exe-7.3.2_p37-r1.ebuild @@ -38,6 +38,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/pypy3-7.3.2-sethostname-bytes.patch + "${FILESDIR}"/pypy3-7.3.2-ppc64-segfault.patch ) check_env() {