Message ID | 20231130154547.17694-1-jchrist@linux.ibm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp481441vqy; Thu, 30 Nov 2023 07:46:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7WJMd5F5C+1L97jAm7qk917rnxM5fi4j8B/VkZvRX4++xSAHbngYQ292nc95RdO0gFumW X-Received: by 2002:a05:6102:160c:b0:45d:aa3e:a78 with SMTP id cu12-20020a056102160c00b0045daa3e0a78mr27517567vsb.10.1701359195379; Thu, 30 Nov 2023 07:46:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701359195; cv=pass; d=google.com; s=arc-20160816; b=xzWv3iNxADr+tKWBpVHq33yzlfPoN6eWpwG/Q2ozfZhG/RgmC19BbdLdnGwLoqZVf+ sguOcLc0OohlR7YIgzQYtwrqYsLvw+VL7Flud3ZaMO9vJWvfq+nuawfDI3UHUn82oN0A NXsaWFfO1PaP0bIgbGSP76u90WELhavkdQ32+657ujJKnkuQrD/rb5NPqEUW8Zw9fHd6 /juqRSEbK//Er9L5jds79ZX1bPH+Mb1PWOpzpki8u+KZcE6Nb5nCBWirt1zlfIGDbK9W yMJa5XSzB1Wq0cpVP4CE8h9o+JkHmI5gDragAdlTFPIuinVQPuKJGM29fM+PEFfaVMIM ZEgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=QR76l3VfpScv5W5l7qiT1PuLG28f+iVQkOEJFB0r+FY=; fh=9kNvVTSI6DlgdGzGqx0+PqDVRbZ9BRNCe8aNB0KUSCk=; b=MwmQOgl+iOOjWzbdZK4t91b69iqwTWRtwWiSaxT5bwxM9xgqnY8W1KGzDmKfCvWta0 vPf1qehrYpMHOsV0tsSbD+i21d7ZMRAzwf2RBRknZHGAxGqQtTNqi2OeQYr2XLyX76cp qPyOTIcaZDpYfC5ZLUa7pMkGsvJCU6Uiq6BE0+KZyvJIj4mHRxAglt8s/dRCl6P48bmK 9mCNt/9OCJlyPehpjD9u5SsoyQYB4WlkL/tXP3kWjBHhGYMoev274QiragaGkI8/n+Co QA8H+xK0gMBXueBazyNQIrYD3V6MNp+1NSMjTGnWYkFkUeanrDS0MZpMCmWU5buQnXrn v9tg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=i8KFghcJ; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id jm3-20020a056102198300b00452ef781effsi239394vsb.341.2023.11.30.07.46.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 07:46:35 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=i8KFghcJ; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 20C16385ED72 for <ouuuleilei@gmail.com>; Thu, 30 Nov 2023 15:46:24 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 10875385C32E for <gcc-patches@gcc.gnu.org>; Thu, 30 Nov 2023 15:46:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10875385C32E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 10875385C32E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701359162; cv=none; b=FZXLYskX8/diqdgFteN+uaE+wC/IPLRhYv9lkifebBKQxzLe7NNJryi7s6RRjeutO9kpaRzGOvtrjlD7gAmEuHmukARD78WbR7V0Jat8/zWA6dl/s8qzzx4PZMvEbr7IryyTSaf0QkKfCdZdXcvLU9wZ9tZspd4wbo1G5GDXLrc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701359162; c=relaxed/simple; bh=ZHix4AhXJluEh8EpH1qF8doJVJTyiTtQddIia4DB1v0=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=wUMC67PL/5uet3k+v9foGdKWrsYSBdywTIsLQeTNf1BxRk2kH7HGXeoKHc2gjbU3HnYwu8Opy/QoLjq987+5qWpI4s96FCVbmQoq22M5YuSiWXUSJ6dXx7M7uf24TXow4BLMIF7mRTEl+6EGhaWJHeHkDmHc4V4HO4GwaGQqSeQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3AUFCjBU019997 for <gcc-patches@gcc.gnu.org>; Thu, 30 Nov 2023 15:46:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=QR76l3VfpScv5W5l7qiT1PuLG28f+iVQkOEJFB0r+FY=; b=i8KFghcJRwmB+9cexOsqK7Ag/T5KGKOJXdO1ScaMr7QyjvVO29yt7luFIbSNFjLtBHIb AXEZmDHNUEQBggq/B5MLvBKOmCYbAWJD9Lss6BmUR3CE2oKrxrBX6aRN6TUreerK3QKb XKWq4p9O0N7EdYv3dlU6yNmFlQtpohr/tAp/wnkXhln8hFS2iz2gpIOC1Zc6iqrYPKHv OKSU8YSj0kmP5A2sTq0ZS/jCFVZUc5hrEYMurXuvA1OIcEbb2XDnzv5mlzgVEKju9Z02 ZSXxXIvDTHIKOgtX+LXnRnV/pavTYeF1TFCYZm1ULmk9Bx8nrzy6NwzkrVfSQd7m5anC Ww== Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3upvg6a5kb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Thu, 30 Nov 2023 15:46:00 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3AUDn6BX022191 for <gcc-patches@gcc.gnu.org>; Thu, 30 Nov 2023 15:45:59 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3uku8tf9p3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Thu, 30 Nov 2023 15:45:59 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3AUFjtdm21824160 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Nov 2023 15:45:55 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6A6BE20043; Thu, 30 Nov 2023 15:45:55 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 35B3320040; Thu, 30 Nov 2023 15:45:55 +0000 (GMT) Received: from li-3a824ecc-34fe-11b2-a85c-eae455c7d911.ibm.com.com (unknown [9.171.5.147]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 30 Nov 2023 15:45:55 +0000 (GMT) From: Juergen Christ <jchrist@linux.ibm.com> To: krebbel@linux.ibm.com, gcc-patches@gcc.gnu.org Subject: [PATCH] s390x: Fix PR112753 Date: Thu, 30 Nov 2023 16:45:47 +0100 Message-Id: <20231130154547.17694-1-jchrist@linux.ibm.com> X-Mailer: git-send-email 2.39.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: iq8SrPKGKMghMkKxMlN3Pz1dpNt2oQU6 X-Proofpoint-ORIG-GUID: iq8SrPKGKMghMkKxMlN3Pz1dpNt2oQU6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-11-30_14,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 impostorscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 spamscore=0 phishscore=0 clxscore=1011 mlxscore=0 malwarescore=0 mlxlogscore=919 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2311300112 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784004419633848146 X-GMAIL-MSGID: 1784004419633848146 |
Series |
s390x: Fix PR112753
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Juergen Christ
Nov. 30, 2023, 3:45 p.m. UTC
Commit 466b100e5fee808d77598e0f294654deec281150 introduced a bug in
s390_md_asm_adjust if vector extensions are not available. Fix the control
flow of this function to not adjust long double values.
gcc/ChangeLog:
* config/s390/s390.cc (s390_md_asm_adjust): Fix.
gcc/testsuite/ChangeLog:
* gcc.target/s390/pr112753.c: New test.
Bootstrapped and tested on s390x.
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
---
gcc/config/s390/s390.cc | 4 ++++
gcc/testsuite/gcc.target/s390/pr112753.c | 8 ++++++++
2 files changed, 12 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/s390/pr112753.c
Comments
On 11/30/23 16:45, Juergen Christ wrote: > Commit 466b100e5fee808d77598e0f294654deec281150 introduced a bug in > s390_md_asm_adjust if vector extensions are not available. Fix the control > flow of this function to not adjust long double values. > > gcc/ChangeLog: > > * config/s390/s390.cc (s390_md_asm_adjust): Fix. > > gcc/testsuite/ChangeLog: > > * gcc.target/s390/pr112753.c: New test. > > Bootstrapped and tested on s390x. Committed to mainline with a slightly more verbose changelog which also refers to the BZ. Thanks! Andreas > > Signed-off-by: Juergen Christ <jchrist@linux.ibm.com> > --- > gcc/config/s390/s390.cc | 4 ++++ > gcc/testsuite/gcc.target/s390/pr112753.c | 8 ++++++++ > 2 files changed, 12 insertions(+) > create mode 100644 gcc/testsuite/gcc.target/s390/pr112753.c > > diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc > index 29b5dc979207..3a4d2d346f0c 100644 > --- a/gcc/config/s390/s390.cc > +++ b/gcc/config/s390/s390.cc > @@ -17604,6 +17604,10 @@ s390_md_asm_adjust (vec<rtx> &outputs, vec<rtx> &inputs, > outputs[i] = fprx2; > } > > + if (!TARGET_VXE) > + /* Long doubles are stored in FPR pairs - nothing left to do. */ > + return after_md_seq; > + > for (unsigned i = 0; i < ninputs; i++) > { > if (GET_MODE (inputs[i]) != TFmode) > diff --git a/gcc/testsuite/gcc.target/s390/pr112753.c b/gcc/testsuite/gcc.target/s390/pr112753.c > new file mode 100644 > index 000000000000..7183b3f12bed > --- /dev/null > +++ b/gcc/testsuite/gcc.target/s390/pr112753.c > @@ -0,0 +1,8 @@ > +/* This caused an ICE on s390x due to a bug in s390_md_asm_adjust when no > + vector extension is available. */ > + > +/* { dg-do compile } */ > +/* { dg-options "-O2 -march=zEC12" } */ > + > +long double ____strtold_l_internal___x; > +void ____strtold_l_internal() { __asm__("" : : "fm"(____strtold_l_internal___x)); }
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index 29b5dc979207..3a4d2d346f0c 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -17604,6 +17604,10 @@ s390_md_asm_adjust (vec<rtx> &outputs, vec<rtx> &inputs, outputs[i] = fprx2; } + if (!TARGET_VXE) + /* Long doubles are stored in FPR pairs - nothing left to do. */ + return after_md_seq; + for (unsigned i = 0; i < ninputs; i++) { if (GET_MODE (inputs[i]) != TFmode) diff --git a/gcc/testsuite/gcc.target/s390/pr112753.c b/gcc/testsuite/gcc.target/s390/pr112753.c new file mode 100644 index 000000000000..7183b3f12bed --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pr112753.c @@ -0,0 +1,8 @@ +/* This caused an ICE on s390x due to a bug in s390_md_asm_adjust when no + vector extension is available. */ + +/* { dg-do compile } */ +/* { dg-options "-O2 -march=zEC12" } */ + +long double ____strtold_l_internal___x; +void ____strtold_l_internal() { __asm__("" : : "fm"(____strtold_l_internal___x)); }