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 8601C138334 for ; Fri, 20 Sep 2019 23:12:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B9ADEE08C3; Fri, 20 Sep 2019 23:12:42 +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 917B7E08C3 for ; Fri, 20 Sep 2019 23:12:42 +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 12CE534B435 for ; Fri, 20 Sep 2019 23:12:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EEFC34D3 for ; Fri, 20 Sep 2019 23:12:38 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1569021139.b15b261d1b08f083920d0af5e3640d8ab620302a.slyfox@gentoo> Subject: [gentoo-commits] proj/gcc-patches:master commit in: 8.3.0/gentoo/ X-VCS-Repository: proj/gcc-patches X-VCS-Files: 8.3.0/gentoo/31_all_sparc-fpu-subregs-91269.patch 8.3.0/gentoo/README.history X-VCS-Directories: 8.3.0/gentoo/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: b15b261d1b08f083920d0af5e3640d8ab620302a X-VCS-Branch: master Date: Fri, 20 Sep 2019 23:12:38 +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: f746f062-b8a9-4f0a-bb64-e70defd75b82 X-Archives-Hash: b350b5d221a2578bac31f7752ecbe36d commit: b15b261d1b08f083920d0af5e3640d8ab620302a Author: Sergei Trofimovich gentoo org> AuthorDate: Fri Sep 20 23:12:19 2019 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Fri Sep 20 23:12:19 2019 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b15b261d 8.3.0: backport PR91269 (sparc subreg regression) Bug: https://gcc.gnu.org/PR91269 Signed-off-by: Sergei Trofimovich gentoo.org> 8.3.0/gentoo/31_all_sparc-fpu-subregs-91269.patch | 105 ++++++++++++++++++++++ 8.3.0/gentoo/README.history | 1 + 2 files changed, 106 insertions(+) diff --git a/8.3.0/gentoo/31_all_sparc-fpu-subregs-91269.patch b/8.3.0/gentoo/31_all_sparc-fpu-subregs-91269.patch new file mode 100644 index 0000000..e21d07d --- /dev/null +++ b/8.3.0/gentoo/31_all_sparc-fpu-subregs-91269.patch @@ -0,0 +1,105 @@ +https://gcc.gnu.org/PR91269 + +From bebaf06774baca584c7e9f8410d0e49606a11d60 Mon Sep 17 00:00:00 2001 +From: ebotcazou +Date: Fri, 20 Sep 2019 09:42:40 +0000 +Subject: [PATCH] PR target/91269 * config/sparc/sparc.h + (HARD_REGNO_CALLER_SAVE_MODE): Define. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275994 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/config/sparc/sparc.h | 7 ++++ + gcc/testsuite/gcc.dg/pr91269.c | 70 ++++++++++++++++++++++++++++++++++ + +--- a/gcc/config/sparc/sparc.h ++++ b/gcc/config/sparc/sparc.h +@@ -711,6 +711,13 @@ along with GCC; see the file COPYING3. If not see + register window instruction in the prologue. */ + #define HARD_REGNO_RENAME_OK(FROM, TO) ((FROM) != 1) + ++/* Select a register mode required for caller save of hard regno REGNO. ++ Contrary to what is documented, the default is not the smallest suitable ++ mode but the largest suitable mode for the given (REGNO, NREGS) pair and ++ it quickly creates paradoxical subregs that can be problematic. */ ++#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \ ++ ((MODE) == VOIDmode ? choose_hard_reg_mode (REGNO, NREGS, false) : (MODE)) ++ + /* Specify the registers used for certain standard purposes. + The values of these macros are register numbers. */ + +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/pr91269.c +@@ -0,0 +1,70 @@ ++/* PR target/91269 */ ++/* Testcase by Sergei Trofimovich */ ++ ++/* { dg-do assemble } */ ++/* { dg-options "-O2 -Wno-int-conversion" } */ ++/* { dg-additional-options "-fcall-used-g6 -fPIE -mcpu=niagara4" { target sparc*-*-* } } */ ++ ++struct m; ++ ++enum { a = 2 }; ++int b[1]; ++int d[2715]; ++int e, f, h; ++enum { i = 2 } j; ++inline int c(int k) { ++ char *cp; ++ if (k >= 62 && k <= 247) ++ cp = b[k]; ++ if (cp) ++ return 65533; ++ return 2; ++} ++inline int g(int k) { ++ if (k < sizeof(d)) ++ return e; ++ return 0; ++} ++ ++int u(struct m*, char*, char*); ++ ++int l(struct m *k, char n, long o, int *p) { ++ int q, flags = j, r, s, lasttwo = *p; ++ char inptr, outptr; ++ while (inptr) { ++ if (__builtin_expect(h, 0)) ++ break; ++ unsigned ch = inptr; ++ if (lasttwo) { ++ long need = lasttwo >> 3; ++ if (__builtin_expect(need > n, 0)) ++ break; ++ } else if (s == i) { ++ long t = c(ch); ++ if (t != 65533) { ++ int jch = g(ch); ++ if (jch & 8) ++ continue; ++ } ++ } ++ if (ch <= 5) ++ ; ++ else { ++ long t = c(ch); ++ if (t != 65533) ++ ; ++ else { ++ switch (f >> 8) ++ case 79: ++ q = f == 20308 || f == 20350; ++ if (q) ++ if (j) ++ r = u(k, &inptr, &outptr); ++ s = *p; ++ if (r) ++ if (o && flags & a) ++ break; ++ } ++ } ++ } ++} +-- +2.23.0 + diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history index 68b1fd8..3400182 100644 --- a/8.3.0/gentoo/README.history +++ b/8.3.0/gentoo/README.history @@ -1,6 +1,7 @@ 1.2 TODO + 29_all_ia64-bootstrap.patch + 30_all_sparc-PIC-constant-PR91472.patch + + 31_all_sparc-fpu-subregs-91269.patch 1.1 06 Apr 2019 + 26_all_overridable_native.patch