From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6896215827B for ; Sat, 30 Aug 2025 14:06:26 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 527C2340E92 for ; Sat, 30 Aug 2025 14:06:26 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id F0DB5110563; Sat, 30 Aug 2025 14:06:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id EAF37110563 for ; Sat, 30 Aug 2025 14:06:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9B7A4340D33 for ; Sat, 30 Aug 2025 14:06:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3A5E5322F for ; Sat, 30 Aug 2025 14:06:14 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1756562767.b40afae619f7e54eebfaccd612ca27b0c2c8eb8a.sam@gentoo> Subject: [gentoo-commits] proj/gcc-patches:master commit in: 16.0.0/gentoo/ X-VCS-Repository: proj/gcc-patches X-VCS-Files: 16.0.0/gentoo/90_all_PR121725-x86-64-Use-UNSPEC_DTPOFF-to-check-source-operand-in-.patch 16.0.0/gentoo/README.history X-VCS-Directories: 16.0.0/gentoo/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: b40afae619f7e54eebfaccd612ca27b0c2c8eb8a X-VCS-Branch: master Date: Sat, 30 Aug 2025 14:06:14 +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: a58617cd-7151-40fa-94a0-a23dc5d830df X-Archives-Hash: 6e999b185b88996bc4e658f2d1b549af commit: b40afae619f7e54eebfaccd612ca27b0c2c8eb8a Author: Sam James gentoo org> AuthorDate: Sat Aug 30 14:06:07 2025 +0000 Commit: Sam James gentoo org> CommitDate: Sat Aug 30 14:06:07 2025 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b40afae6 16.0.0: drop patch merged upstream Signed-off-by: Sam James gentoo.org> ...UNSPEC_DTPOFF-to-check-source-operand-in-.patch | 158 --------------------- 16.0.0/gentoo/README.history | 2 - 2 files changed, 160 deletions(-) diff --git a/16.0.0/gentoo/90_all_PR121725-x86-64-Use-UNSPEC_DTPOFF-to-check-source-operand-in-.patch b/16.0.0/gentoo/90_all_PR121725-x86-64-Use-UNSPEC_DTPOFF-to-check-source-operand-in-.patch deleted file mode 100644 index 35641f2..0000000 --- a/16.0.0/gentoo/90_all_PR121725-x86-64-Use-UNSPEC_DTPOFF-to-check-source-operand-in-.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 04e11f7b467e53c513548d59e0c4ac256adb2c30 Mon Sep 17 00:00:00 2001 -From: "H.J. Lu" -Date: Fri, 29 Aug 2025 12:53:18 -0700 -Subject: [PATCH] x86-64: Use UNSPEC_DTPOFF to check source operand in - TLS64_COMBINE - -Since the first operand of PLUS in the source of TLS64_COMBINE pattern: - -(set (reg/f:DI 128) - (plus:DI (unspec:DI [ - (symbol_ref:DI ("_TLS_MODULE_BASE_") [flags 0x10]) - (reg:DI 126) - (reg/f:DI 7 sp) - ] UNSPEC_TLSDESC) - (const:DI (unspec:DI [ - (symbol_ref:DI ("bfd_error") [flags 0x1a] ) - ] UNSPEC_DTPOFF)))) - -is unused, use the second operand of PLUS: - -(const:DI (unspec:DI [ - (symbol_ref:DI ("bfd_error") [flags 0x1a] ) - ] UNSPEC_DTPOFF)) - -to check if 2 TLS_COMBINE patterns have the same source. - -gcc/ - - PR target/121725 - * config/i386/i386-features.cc - (pass_x86_cse::candidate_gnu2_tls_p): Use the UNSPEC_DTPOFF - operand to check source operand in TLS64_COMBINE pattern. - -gcc/testsuite/ - - PR target/121725 - * gcc.target/i386/pr121725-1a.c: New test. - * gcc.target/i386/pr121725-1b.c: Likewise. - -Signed-off-by: H.J. Lu ---- - gcc/config/i386/i386-features.cc | 32 +++++----------- - gcc/testsuite/gcc.target/i386/pr121725-1a.c | 41 +++++++++++++++++++++ - gcc/testsuite/gcc.target/i386/pr121725-1b.c | 6 +++ - 3 files changed, 57 insertions(+), 22 deletions(-) - create mode 100644 gcc/testsuite/gcc.target/i386/pr121725-1a.c - create mode 100644 gcc/testsuite/gcc.target/i386/pr121725-1b.c - -diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc -index 5440a02c442..0608dd2f9ac 100644 ---- a/gcc/config/i386/i386-features.cc -+++ b/gcc/config/i386/i386-features.cc -@@ -4291,34 +4291,22 @@ pass_x86_cse::candidate_gnu2_tls_p (rtx set, attr_tls64 tls64) - */ - - scalar_mode = mode = GET_MODE (src); -- rtx src0 = XEXP (src, 0); -- tls_symbol = XVECEXP (src0, 0, 0); -- rtx src1 = XVECEXP (src0, 0, 1); -- if (REG_P (src1)) -- { -- set_insn = tls_set_insn_from_symbol (src1, tls_symbol); -- gcc_assert (set_insn); -- } -- else -- { -- set_insn = nullptr; -- gcc_assert (GET_CODE (src1) == UNSPEC -- && XINT (src1, 1) == UNSPEC_TLSDESC -- && SYMBOL_REF_P (XVECEXP (src1, 0, 0)) -- && rtx_equal_p (XVECEXP (src1, 0, 0), tls_symbol)); -- } - -- /* Use TLS_SYMBOL and -+ /* Since the first operand of PLUS in the source TLS_COMBINE -+ pattern is unused, use the second operand of PLUS: - - (const:DI (unspec:DI [ - (symbol_ref:DI ("e") [flags 0x1a]) - ] UNSPEC_DTPOFF)) - -- as VAL to check if 2 patterns have the same source. */ -- -- rtvec vec = gen_rtvec (2, tls_symbol, XEXP (src, 1)); -- val = gen_rtx_UNSPEC (mode, vec, UNSPEC_TLSDESC); -- def_insn = set_insn; -+ as VAL to check if 2 TLS_COMBINE patterns have the same -+ source. */ -+ val = XEXP (src, 1); -+ gcc_assert (GET_CODE (val) == CONST -+ && GET_CODE (XEXP (val, 0)) == UNSPEC -+ && XINT (XEXP (val, 0), 1) == UNSPEC_DTPOFF -+ && SYMBOL_REF_P (XVECEXP (XEXP (val, 0), 0, 0))); -+ def_insn = nullptr; - return true; - } - -diff --git a/gcc/testsuite/gcc.target/i386/pr121725-1a.c b/gcc/testsuite/gcc.target/i386/pr121725-1a.c -new file mode 100644 -index 00000000000..d0a498cace9 ---- /dev/null -+++ b/gcc/testsuite/gcc.target/i386/pr121725-1a.c -@@ -0,0 +1,41 @@ -+/* { dg-do compile { target *-*-linux* } } */ -+/* { dg-options "-O3 -fpic -fplt -mtls-dialect=gnu" } */ -+ -+typedef enum -+{ -+ bfd_error_invalid_error_code -+} bfd_error_type; -+static thread_local bfd_error_type bfd_error; -+extern int sections; -+extern void *bfd_alloc_ret; -+extern int bfd_alloc___o; -+extern long bfd_alloc_size; -+ -+extern void _objalloc_alloc (int *, long); -+ -+bfd_error_type -+bfd_get_error () -+{ -+ return bfd_error; -+} -+ -+bool -+s7_bfd_score_elf_late_size_sections () -+{ -+ for (; sections;) -+ { -+ if (bfd_alloc_size) -+ { -+ bfd_error_type error_tag; -+ bfd_error = error_tag; -+ } -+ _objalloc_alloc (&bfd_alloc___o, 0); -+ if (bfd_alloc_ret) -+ { -+ bfd_error_type error_tag; -+ bfd_error = error_tag; -+ } -+ } -+} -+ -+/* { dg-final { scan-assembler-times "call\[ \t\]__tls_get_addr@PLT" 2 { target { ! ia32 } } } } */ -diff --git a/gcc/testsuite/gcc.target/i386/pr121725-1b.c b/gcc/testsuite/gcc.target/i386/pr121725-1b.c -new file mode 100644 -index 00000000000..0b97a8a4cb6 ---- /dev/null -+++ b/gcc/testsuite/gcc.target/i386/pr121725-1b.c -@@ -0,0 +1,6 @@ -+/* { dg-do compile { target *-*-linux* } } */ -+/* { dg-options "-O3 -fpic -fplt -mtls-dialect=gnu2" } */ -+ -+#include "pr121725-1a.c" -+ -+/* { dg-final { scan-assembler-times "call\[ \t\]\\*bfd_error@TLSCALL\\(%(?:r|e)ax\\)" 2 { target { ! ia32 } } } } */ --- -2.51.0 diff --git a/16.0.0/gentoo/README.history b/16.0.0/gentoo/README.history index 7bdc805..95bc5dd 100644 --- a/16.0.0/gentoo/README.history +++ b/16.0.0/gentoo/README.history @@ -1,9 +1,7 @@ 13 ???? U 86_all_PR120933-i386-default-to-mtls-dialect-gnu2-if-appropriate.patch - + 90_all_PR121725-x86-64-Use-UNSPEC_DTPOFF-to-check-source-operand-in-.patch + 91_all_PR121699-mesa.patch - + 92_all_PR121718-underlinked.patch 12 24 August 2025