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: 1815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp307888wrs; Fri, 7 Oct 2022 06:51:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6sknVXlCj9GsKTzmqdV/awE8AXENDO7vaovaU/WMbgYW69IgzEoORRKj1ZzUgJd4C1q01C X-Received: by 2002:a17:907:2cf3:b0:77d:89da:499c with SMTP id hz19-20020a1709072cf300b0077d89da499cmr4083169ejc.694.1665150663229; Fri, 07 Oct 2022 06:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665150663; cv=none; d=google.com; s=arc-20160816; b=ihp2TX1EQ2rrf6APozoI0bGLH+K3EAPzjdNqinmLkAgBQEPCNlMo0Wvr4Wuhz+xQxa Imxi6cjdyVhdrFQogSePXN+8mr/mFlCHSO6LVihn9Xur4LJpCdtUHHvjyb3fmA/QpKkA evLcJX9aMZpAs9GHXVMYQbET4YE7Lvi1VDYty7o+brprJHlIEpYZBrA90ml6qiNyfgkb UziFftHsORcafs182784Nfk4f4BKWCtw7FZW7VrI+7nrHEDuv1bg4yw3RXjXfGOAx8Xg OYiSrN9tNY+k5dwOkYg94l7iLsWH/3ZqDXPcMdtznJoRPXbV3stv8YDvifz1qnNOxXrN kkMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:to:from :content-transfer-encoding:mime-version:message-id:date:subject :dkim-signature:dmarc-filter:delivered-to; bh=3+8t37O0vIyNR0Lwq3lwXp4mvAeUsx0U7p8MzFEqlzE=; b=eur6g9YdArhT/N58bZNdlwrns96/xgzj6n6x3Le51wJWMCkmDeeSMQZ/WhgkKDT2Kl TymDJBlIXaO80YscIt3l67OZCS2eUi5gqa8pZ6U0kjPbj2S/nFnfBgo5uYKfs8PcXmTe Qw47Gn/rhJhI1dFDjjt/9V0mqSBYP4jRN7iHyQ39pTE711u5DxdPuBDiosTWrTw0BmTB pimQ80Z/u3EyYqwVUZnqyANpB7WekoSA4zaWViNVxp9Fcs8KBqaDu1BCMAL3/9PLQEt4 ax2BFTtkG46XkWMCDFSH1UbLYP2Ds55fhZPVdLGvqXc4QJLAW1LbUBtYClghn2eUIPIj M8Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b="6ECAF/12"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id cm28-20020a0564020c9c00b00459b51c2b25si1986845edb.438.2022.10.07.06.51.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Oct 2022 06:51:03 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=fail header.i=@rivosinc-com.20210112.gappssmtp.com header.s=20210112 header.b="6ECAF/12"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 814153949094 for ; Fri, 7 Oct 2022 13:50:43 +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-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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746037022222343931?= X-GMAIL-MSGID: =?utf-8?q?1746037022222343931?= 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}.