From patchwork Thu May 4 19:29:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Bergner X-Patchwork-Id: 90218 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp525889rwl; Thu, 4 May 2023 12:30:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Q4SVH1EVRfrj1Tqz7ZH5OaUh8in4GdtqxEawU6IOibkS6h8A4EXNbMJZII0o5eYr182sI X-Received: by 2002:a17:907:9694:b0:961:272d:bdb8 with SMTP id hd20-20020a170907969400b00961272dbdb8mr7925644ejc.73.1683228627587; Thu, 04 May 2023 12:30:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683228627; cv=none; d=google.com; s=arc-20160816; b=Gl2R4Dffd0UqDW1ZAuylfO4gZZwbqdDa4CSrF4qRvaWCDJAy0NODHzLHfbtosRS2wz 3lBbLl7eAk6EL41OyolLhN29uCqnRYdMvHiFKloxtDzmlIxD4dEfj7EWMOqZ7K98AcuO CP0cMmIqAdGaNQzYbqpHaXmdXxa5tQWywF72WHT2K4LGai+UMhvETVBPfBktfhyuWIJY T1Nd43nayFpFgpMg/YnFZmLLOHFuIli7rJxQRsQaCcF8afFF6uCE30B97KC0gzkbxSql 4mUezCVed5feaSvD/K945he2ndh4kPgggIRpuQi+IcbxLpExUOcDt3Z5X0k6xCrto/3j PopQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:cc:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=0sRScSFBW/m8Wk7OwXVXHIr9dNdkHZVHg/lQl7s3XUY=; b=FTjPv1VDpIg4IX/w7RKFRSAJigC9NPrsYTDun7IKhB2ikutg9sdHyUlA0D0EFo7fK1 ixp9kcT6ECouwnEsFi/FxfDnR840k+4NkHskfAShFKm52ZgYBjtuxJO7WBufABWXGft9 IhdemYgv7/erx7VT4akNr1lx2rTwk/NVzv2ZeHnUx1wx+zrtFl1xhnSrjKHClYUdYanH Q1YIuZ+m9g83lKjyZtAGCuM1j4iOVVPa3Ouh9dnfvH+eC9at0HwYViKZgzyy9wYaYs/y kbSr70oX8T2NyUHRXzuhLJfJUf/z5iQoAQBcIG0ak+s56c/P1VRrTU3TqJBZIhl4SdMm NuEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Rjvp72Mz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p20-20020a170906229400b0094ef17510d6si19995936eja.862.2023.05.04.12.30.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 12:30:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Rjvp72Mz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 194FA3858C20 for ; Thu, 4 May 2023 19:30:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 194FA3858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683228626; bh=0sRScSFBW/m8Wk7OwXVXHIr9dNdkHZVHg/lQl7s3XUY=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Rjvp72MzQFI7optEBgbe9Iu5RmsFj9bYoD9oHc6ILBx1WWgIvKXTcB0jK8mFgMfSZ w5kePK71w5gcc6Rlzo8glZPbkmWHZywkt/IzIzb8EHqcYJaGj5SYnTXlUHrOaktnnE idfSJYvA+3J7y4KcuE2/OJGNyRS1y1X4MuckmHAU= 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 15D083858D33 for ; Thu, 4 May 2023 19:29:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 15D083858D33 Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 344JBZa8013697; Thu, 4 May 2023 19:29:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qcfpxf825-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 May 2023 19:29:38 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 344JRKOP020004; Thu, 4 May 2023 19:29:37 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qcfpxf81g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 May 2023 19:29:37 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 344G3s1X002049; Thu, 4 May 2023 19:29:36 GMT Received: from smtprelay04.dal12v.mail.ibm.com ([9.208.130.102]) by ppma05wdc.us.ibm.com (PPS) with ESMTPS id 3q8tv8345g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 May 2023 19:29:36 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay04.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 344JTZcQ31719820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 May 2023 19:29:36 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E1F7758057; Thu, 4 May 2023 19:29:35 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7FEA158058; Thu, 4 May 2023 19:29:35 +0000 (GMT) Received: from [9.61.83.151] (unknown [9.61.83.151]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 4 May 2023 19:29:35 +0000 (GMT) Message-ID: Date: Thu, 4 May 2023 14:29:34 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Content-Language: en-US To: GCC Patches Cc: Jakub Jelinek , Segher Boessenkool , =?utf-8?q?Dan_Hor=C3=A1k?= Subject: [PATCH] libffi: fix handling of homogeneous float128 structs [PR109447] X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: LqFqVCiPptZzG35oNoS4cQarY9agtsMW X-Proofpoint-GUID: pKtiSbqt4_2lRRbtZGqpewgCoFoXL6S4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-04_13,2023-05-04_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 phishscore=0 mlxlogscore=999 impostorscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2305040153 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Peter Bergner via Gcc-patches From: Peter Bergner Reply-To: Peter Bergner Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764993141455198914?= X-GMAIL-MSGID: =?utf-8?q?1764993141455198914?= I'd like to pull in Dan's upstream libffi commit into trunk to fix a wrong code bug/testsuite failure on powerpc64le-linux with long double defaulting to ieee128. This passed bootstrap and regtesting with no regressions. Ok for trunk? This bug is also on the GCC 12 and GCC 11 release branches. Ok there too assuming testing is clean? I can wait to push the gcc12 backport until after the release. Peter If there is a homogeneous struct with float128 members, they should be copied to vector register save area. The current code incorrectly copies only the value of the first member, not increasing the pointer with each iteration. Fix this. Merged from upstream libffi commit: 464b4b66e3cf3b5489e730c1466ee1bf825560e0 2023-05-03 Dan HorĂ¡k libffi/ PR libffi/109447 * src/powerpc/ffi_linux64.c (ffi_prep_args64): Update arg.f128 pointer. diff --git a/libffi/src/powerpc/ffi_linux64.c b/libffi/src/powerpc/ffi_linux64.c index 4d50878e402..3454dacd3d6 100644 --- a/libffi/src/powerpc/ffi_linux64.c +++ b/libffi/src/powerpc/ffi_linux64.c @@ -680,7 +680,7 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack) { if (vecarg_count < NUM_VEC_ARG_REGISTERS64 && i < nfixedargs) - memcpy (vec_base.f128++, arg.f128, sizeof (float128)); + memcpy (vec_base.f128++, arg.f128++, sizeof (float128)); else memcpy (next_arg.f128, arg.f128++, sizeof (float128)); if (++next_arg.f128 == gpr_end.f128)