From patchwork Wed Mar 20 16:05:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 1914155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=HlY+ZXls; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V0D2y5ZpMz1yWy for ; Thu, 21 Mar 2024 03:05:46 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B4F643858432 for ; Wed, 20 Mar 2024 16:05:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 F3D4D3858432 for ; Wed, 20 Mar 2024 16:05:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3D4D3858432 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F3D4D3858432 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710950725; cv=none; b=M9YY/B7zR2Eliq7FitQz5TAfkHsYBuk4ee3XxG+nh3tIFw0ybo90GdmuMEwlqr6Iv9t1AxpEOfAvq/rNqB8o6GE/+L8956RTmV2dLfUDqXPYGpJYcXZIH5eb0uE8JABgigXLCWzq7mXrJyv10X0KEBE8vScdynfA5xFgL7G9TJI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710950725; c=relaxed/simple; bh=YHvQCkzfnN1wP6ocxQKXtqwB+FpmNIKNBgYrkjwpsng=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=EvTuBidFs1YhKStHaefuCRzy5xO8qAF6ghx4cCnczJEGunsENZ7uaXjb3TBxrFE/yvreC1icK1j53WlUEYGvtxAKIW1miepRenprLlyFoMSDAWoDdr0sGOtXjG4jLvCqQm93k+c4m8qZP8iqmUDV7LlTgCsJY+Tawc+Sa5/rmP4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710950714; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=8lJWuY/f8JwGlZL+JNNWS2oinmX0CyBWzTJHoHTzsXs=; b=HlY+ZXls8C6hj2i3UQ2z/wVChkCieTVPKwLsvld/v4cvOZqebOqx1oFHmK/m7jbUAofEiC PhKB6V11IxI8vnCQg/iuqcge7LRhlzuPwTvtgX8yDlMRoHG1X5uxo5y7qjTngJ5jcXjfD/ 79BI+qFUIfktjY1iC4qJxJB9xYzfpuk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-620-5OTRnnoXNGm0QbnDmoY9iQ-1; Wed, 20 Mar 2024 12:05:13 -0400 X-MC-Unique: 5OTRnnoXNGm0QbnDmoY9iQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CBBD0800262 for ; Wed, 20 Mar 2024 16:05:12 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.57]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 903821C06542 for ; Wed, 20 Mar 2024 16:05:12 +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 42KG56rG1166332 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Wed, 20 Mar 2024 17:05:06 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 42KG556p1166331 for gcc-patches@gcc.gnu.org; Wed, 20 Mar 2024 17:05:05 +0100 Date: Wed, 20 Mar 2024 17:05:05 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] epiphany: Fix up epiphany_setup_incoming_varargs [PR114175] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Hi! Like for x86-64, alpha or rs6000, epiphany seems to be affected too. Just visually checked differences in c23-stdarg-9.c assembly in a cross without/with the patch, committed to trunk. 2024-03-20 Jakub Jelinek PR target/114175 * config/epiphany/epiphany.cc (epiphany_setup_incoming_varargs): Only skip function arg advance for TYPE_NO_NAMED_ARGS_STDARG_P functions if arg.type is NULL. Jakub --- gcc/config/epiphany/epiphany.cc.jj 2024-01-03 11:51:47.401510931 +0100 +++ gcc/config/epiphany/epiphany.cc 2024-03-20 16:10:08.152226880 +0100 @@ -728,7 +728,8 @@ epiphany_setup_incoming_varargs (cumulat gcc_assert (arg.mode != BLKmode); next_cum = *get_cumulative_args (cum); - if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl))) + if (!TYPE_NO_NAMED_ARGS_STDARG_P (TREE_TYPE (current_function_decl)) + || arg.type != NULL_TREE) next_cum = (ROUND_ADVANCE_CUM (next_cum, arg.mode, arg.type) + ROUND_ADVANCE_ARG (arg.mode, arg.type)); first_anon_arg = next_cum;