From patchwork Fri Oct 7 13:49:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 58521 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 6067239524BD for ; Fri, 7 Oct 2022 13:50:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by sourceware.org (Postfix) with ESMTPS id 44D8A3858C56 for ; Fri, 7 Oct 2022 13:50:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 44D8A3858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-x102d.google.com with SMTP id h8-20020a17090a054800b00205ccbae31eso7265663pjf.5 for ; Fri, 07 Oct 2022 06:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:from:to:cc:subject:date:message-id:reply-to; bh=3+8t37O0vIyNR0Lwq3lwXp4mvAeUsx0U7p8MzFEqlzE=; b=6ECAF/12z7Y7qgXhC/JDPEMYqsiiYqJjztxNIoQyqZdvrGXKAWDFbOa1QPR6lBrn0v nZxKXoyjrucjC9CZSJ3qy5RJtJyL8MljXSc+xvATGMjya9P1ExWELMiD5TAyUTAC4iGz 87MDjgukVyI/G2pueYEL265Y4h4qe14to/uTN6rE6yjcQLqRW5a+M602H5OmCI+gOiv1 vslHdEOBWNEmJBMIDW+5ONGrixS+YlTT82PMs9jBtGamnok2feqpvOAAK53r+IVsNYxK 3+C0f8o2DZ0JRTVtyc+1P/BbUUmUUP5gtpEzwY2hx1g0V/PNqw3Y8kdyk3QgtZ0l78bh NPmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:from:cc:content-transfer-encoding:mime-version:message-id:date :subject:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3+8t37O0vIyNR0Lwq3lwXp4mvAeUsx0U7p8MzFEqlzE=; b=Sdh4UW7ER18UV+8vj25tqz4IlLbl/VFuILnfX5tR3KolGyIh49j7t+IPW7/uQwaQIU jwZuwRx0g+7YaMl+792GBIEIIbpY3rooe9iWS+a2a769h1drYbcG2n3E2dJ284m3JbOw LAbKYnPrDl7xnZMGaD9dVFW6HY55vlqjkKRSxNM/pK4oBqBn1pBJ77iWVL9NM3fglrss 7/5l/Xz36+AgLIk8USxJNecJqRMGwkw5AT3+bOXyxr9eaGAC6TOoZpV15yAmUjPu4b8Q 240bxISr7PxQ9OzEh26alzOLv90W6FSfsxdTKspy9vaFMpUqV39fA5gkUlj2BzNDiagl B6Hg== X-Gm-Message-State: ACrzQf13vY8MMdx1mx8LFMOWGZbVVNZWC6lPw0oaBWkmusL94e5p+YCL 6rf/4chJRqQIy3S7Wie/G6TNMg== X-Google-Smtp-Source: AMsMyM7UQP6aiasLpdjCacqmLdWkKfiuTDRibO1De9pM2GpdDYAErrKcNRKHvMJsJptwaZOo6JaErA== X-Received: by 2002:a17:903:11c3:b0:17a:e62:16e8 with SMTP id q3-20020a17090311c300b0017a0e6216e8mr5064910plh.137.1665150619232; Fri, 07 Oct 2022 06:50:19 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id v66-20020a622f45000000b0053e4296e1d3sm1612232pfv.198.2022.10.07.06.50.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 06:50:18 -0700 (PDT) Subject: [PATCH] doc: -falign-functions doesn't override the __attribute__((align(N))) Date: Fri, 7 Oct 2022 06:49:01 -0700 Message-Id: <20221007134901.5078-1-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 From: Palmer Dabbelt To: gcc-patches@gcc.gnu.org, hubicka@ucw.cz, richard.guenther@gmail.com X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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.29 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 Sender: "Gcc-patches" I found this when reading the documentation for Kito's recent patch. From the discussion it sounds like this is the desired behavior, so let's document it. gcc/doc/ChangeLog * invoke.texi (-falign-functions): Mention __align__ --- gcc/doc/invoke.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2a9ea3455f6..8326a60dcf1 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -13136,7 +13136,9 @@ effective only in combination with @option{-fstrict-aliasing}. Align the start of functions to the next power-of-two greater than or equal to @var{n}, skipping up to @var{m}-1 bytes. This ensures that at least the first @var{m} bytes of the function can be fetched by the CPU -without crossing an @var{n}-byte alignment boundary. +without crossing an @var{n}-byte alignment boundary. This does not override +functions that otherwise specify their own alignment constraints, such as via +an alignment attribute. If @var{m} is not specified, it defaults to @var{n}.