From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 4CBEE3858422 for ; Fri, 5 May 2023 21:42:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4CBEE3858422 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683322933; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HycS0HB0ARU/b+CrtqCKVIzpwQfeNjLbG8oFdxEMyaw=; b=eYmeJVLJQGI1EoaVsSOe59xQDckLciTP3XjE0cA1xIOmy7j7zpy/gfmcD4osJCajnuTYpH 5R+b386+0W237G0oq0F7CgxEUQiIiESmDQ40oV9h4q0o/sfpl8FDTELQwM0zoDF6nlb0jt Fa10YJEedFxLZUFCJu64ByPGI9RQ0ec= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-482-vFD0QqmvOe-H_SAN2DlZ5A-1; Fri, 05 May 2023 17:42:09 -0400 X-MC-Unique: vFD0QqmvOe-H_SAN2DlZ5A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A0BC85A588; Fri, 5 May 2023 21:42:09 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.156]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E7B68C15BA0; Fri, 5 May 2023 21:42:08 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 345Lg5qE3558438 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 5 May 2023 23:42:06 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 345Lg3UM3558437; Fri, 5 May 2023 23:42:03 +0200 Date: Fri, 5 May 2023 23:42:02 +0200 From: Jakub Jelinek To: Peter Bergner Cc: GCC Patches , Segher Boessenkool , Dan =?iso-8859-1?Q?Hor=E1k?= Subject: Re: [PATCH] libffi: fix handling of homogeneous float128 structs [PR109447] Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: On Thu, May 04, 2023 at 02:29:34PM -0500, Peter Bergner wrote: > 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. Ok for 14/13.2/12.4 (i.e. after 12.3 is out)/11.4 > 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) Jakub