From patchwork Wed Sep 18 20:36:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 57465 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F1B46385DDCC for ; Wed, 18 Sep 2024 21:03:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) by sourceware.org (Postfix) with ESMTPS id 0A4D0385840E for ; Wed, 18 Sep 2024 21:02:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A4D0385840E Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0A4D0385840E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.241.56.171 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726693348; cv=none; b=pUKrxyrvYPsiaKO9xIcQpNlbSthTevIj0BzIsqibEmtk3YLXdeJ5NadN2U3e+Zp6FKc23fuHt8Pikm4LlAZDAwUS8thODf+gaoiWkNZEXNazOeWhgNfY279L3n91ncxJCJt7w9kuBIrf1+qB/Hwx7TbdQqtH9ixzBMvzLMMawio= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726693348; c=relaxed/simple; bh=m36LusBNp+yjZlt4Ky7XZwenir7mM0bAhc22e+Q7+sw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jUrbsPWleTc+kd2SFSh9rncLcZdN3jdOK36BFM+mXdcMYocpjwTpzXBd3+DzL+8yxWSt4JPBe5DFzc4WXESy7OGQUSsCDEPujbi4VWhUmE/Rlihh6gG+YLXl85LaBTZEcoPJ+fOza2o4i5ew0sDsEZP29afAhsKteI0UeNbuxyE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4X8B1C1XsYz9sjC; Wed, 18 Sep 2024 23:02:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1726693343; h=from:from: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; bh=KTyegPvX+iwlc8tZgOnfUB4u+HIlTGxmkKoDme6Y0fs=; b=xqa0EtF9oGvpUSBoqQy+yO3zAxoZsrq22aolFq63rCdCQqHakvAtiGfQvksIbSwJdYM40p uSU0TysNNEVJrPq/5FE9sgvMWVKurXQ0Ys+jgI+GlB7iP88p5+Q12bsZsmKoduZ7QdsUoq cd0I6cvPWmtdCjPk8LgA4zV6by0475TlJc4Bb2PKIJT2AGFg1egl3d7ajW0puylMwMQEc2 ZjB6kAkXzpp0PTiljUivq0e1S6YJS9aSyZq1zHj5258vRBqVhcTEWyhsIc8O28KtaN8h+M ZTsR8H2s+TWMMs0Ozqb3PzkAfDSGcGZzwCCjpZtWXOrzFMjZHWIpqY9HwX/J0w== From: =?utf-8?q?Arsen_Arsenovi=C4=87?= To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, Iain Sandoe , Jonathan Wakely , =?utf-8?q?Arsen_Arsenovi=C4=87?= Subject: [PATCH 0/2] Support for coroutine frames with new-extended alignment Date: Wed, 18 Sep 2024 22:36:11 +0200 Message-ID: <20240918210202.192478-1-arsen@aarsen.me> MIME-Version: 1.0 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP 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: , Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org This patch series implements support for coroutines whose frames require alignment. The standard currently does not specify much about this case AFAICT, so we can do this for now (until P2014 progresses). The new dump was useful for testing, and might be useful to coroutine hackers. This patchset also depends on Iains ramp rework patch, so will be pushed after. Tested on x86_64-pc-linux-gnu. OK for trunk? TIA, have a most lovely evening. Arsen Arsenović (2): c++: Implement a coroutine language debug dump c++/coroutines: handle (new-)extended alignment [PR104177] gcc/c-family/c-pretty-print.cc | 3 +- gcc/coroutine-passes.cc | 8 +- gcc/cp/coroutines.cc | 538 ++++++++++++++++-- gcc/cp/coroutines.h | 2 +- gcc/cp/cp-objcp-common.cc | 2 + gcc/cp/cp-tree.h | 1 + gcc/cp/cxx-pretty-print.cc | 3 +- gcc/dumpfile.cc | 2 +- .../g++.dg/coroutines/frame-alignment-4.C | 35 ++ .../coroutines/torture/frame-alignment-1.C | 73 +++ .../coroutines/torture/frame-alignment-2.C | 101 ++++ .../coroutines/torture/frame-alignment-3.C | 87 +++ 12 files changed, 791 insertions(+), 64 deletions(-) create mode 100644 gcc/testsuite/g++.dg/coroutines/frame-alignment-4.C create mode 100644 gcc/testsuite/g++.dg/coroutines/torture/frame-alignment-1.C create mode 100644 gcc/testsuite/g++.dg/coroutines/torture/frame-alignment-2.C create mode 100644 gcc/testsuite/g++.dg/coroutines/torture/frame-alignment-3.C