From patchwork Fri Dec 10 01:16:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 48742 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 75C6D3858024 for ; Fri, 10 Dec 2021 01:17:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75C6D3858024 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1639099054; bh=sLGeOHZy5KzKAlv4tYWXFRhRNEM2BnZiymAy1tiQGnY=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=riRXoO3AkwOEqtFCS4QYCJYhsyxu0I1TbKlpyH0I785UbJqxHGBKIN9mKLrJ2eRAX NV858zNWiebN9w61WbQCsPlARuzPoRZYT9fx988pSCIui1n/G9cATqMzejDKAFXMx4 jvhEW1guR5UDoJEB8/Pef15KMpVnhpf0Ic7r3flo= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id B85BC3858403 for ; Fri, 10 Dec 2021 01:17:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B85BC3858403 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4J9Cg25t1NzQk3d; Fri, 10 Dec 2021 02:17:02 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de To: gcc-patches@gcc.gnu.org Subject: [committed] d: Align methods to MINIMUM_METHOD_BOUNDARY. Date: Fri, 10 Dec 2021 02:16:55 +0100 Message-Id: <20211210011655.64402-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-Spam-Status: No, score=-15.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch aligns all D defined methods to MINIMUM_METHOD_BOUNDARY, improving interoperability with C++ methods. Bootstrapped and regression tested on x86_64-linux-gnu, committed to mainline and backported to the release branches. Regards, Iain. gcc/d/ChangeLog: * decl.cc (get_symbol_decl): Align methods to MINIMUM_METHOD_BOUNDARY. --- gcc/d/decl.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index a4976b68bf0..55c65759d65 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -1248,6 +1248,9 @@ get_symbol_decl (Declaration *decl) DECL_VINDEX (decl->csym) = size_int (fd->vtblIndex); DECL_VIRTUAL_P (decl->csym) = 1; } + + /* Align method to the specified target boundary. */ + SET_DECL_ALIGN (decl->csym, MINIMUM_METHOD_BOUNDARY); } else if (fd->isMain () || fd->isCMain ()) {