From patchwork Tue Oct 11 21:01:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 58666 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 8D6993853839 for ; Tue, 11 Oct 2022 21:03:10 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id 3E51A385414F for ; Tue, 11 Oct 2022 21:02:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3E51A385414F 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-pg1-x52a.google.com with SMTP id r18so13788965pgr.12 for ; Tue, 11 Oct 2022 14:02:54 -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:references :in-reply-to:message-id:date:subject:from:to:cc:subject:date :message-id:reply-to; bh=3+8t37O0vIyNR0Lwq3lwXp4mvAeUsx0U7p8MzFEqlzE=; b=gx6DI1SPie0LvXnQf0YHHSfISUR0Djs5tlaCU07iIOBU3PIfF0yhyYhaR0rdskR6eL b3V/YyapeobMa/CIjMwH6470k+d6j2O+jxgdTRNeNvLXOyHs4agBNOCi6ePuAYYN3xqR h+ORNJ/hXghj6FdtUj+CVNJ+/QM2VOBo6vQt86gB6ZVZCjPH0Hfabbc9zYh6rePSJ4Aq qKrqeHTp22t0VG5tK8U03lXA61j/JcklvKuVHyoHQsYSPOQ9XpJ8rF2VKxKoZOwvE1Aq TfQZmyO1NGHudEn1iu2R9qktEw5MDfr2lXZ/2wPlL8Wrr36aEqIS8uFljjFPNBGHxP4o gjhw== 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:references :in-reply-to:message-id:date:subject:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3+8t37O0vIyNR0Lwq3lwXp4mvAeUsx0U7p8MzFEqlzE=; b=HKxiQkMYD8qZFWggBISdnXkmJvi2ByVXnCeMUy6GeRYeSnoW2v/N1Tynnw7A4muaad dvKS7x2vGTLhwu/QH0sy2HXSX0RCOiaGkwtslMyEinuraDssYWbp3RO/ufBpErimnfVh q4wmsMo9QAwn83s9Y5DKFwICxUvkv9KaX/1d8T/FdvTMwBRZXoaOZlJo7AWR3aMYgscf +c98QgNhRFaCHZcqJvryTSjRCtFaU2XpOxwdh6y9CsCnZTFuUCMKBNQKpRFLVrMM3j7D MKR+ErM8xq2s0oZV5+R0tAMhPsV2MjmQlgYvwmy1OZUmUIcvGUy49TT8b4tGgZXbM/M/ +MQQ== X-Gm-Message-State: ACrzQf35kSi9iHS5bAWcdoYRWoCOpWqMYQfBiSmgYEbOatqtsb6ZRS+A jLLmH/Zt/RyjnovnfE8MxW8UPA== X-Google-Smtp-Source: AMsMyM5gruiyVe0PXaHtKJrigUm16LGk+LRlyM+G0kO0THyggPnP1ycFZl/uijDEbUgXCWTp/kNxRQ== X-Received: by 2002:a62:3384:0:b0:538:58ab:8fee with SMTP id z126-20020a623384000000b0053858ab8feemr27153859pfz.7.1665522173213; Tue, 11 Oct 2022 14:02:53 -0700 (PDT) Received: from localhost ([50.221.140.188]) by smtp.gmail.com with ESMTPSA id ik17-20020a170902ab1100b001714c36a6e7sm9004531plb.284.2022.10.11.14.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Oct 2022 14:02:52 -0700 (PDT) Subject: [PATCH v2 1/3] doc: -falign-functions doesn't override the __attribute__((align(N))) Date: Tue, 11 Oct 2022 14:01:54 -0700 Message-Id: <20221011210156.7710-2-palmer@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221011210156.7710-1-palmer@rivosinc.com> References: <20221011210156.7710-1-palmer@rivosinc.com> MIME-Version: 1.0 From: Palmer Dabbelt To: richard.guenther@gmail.com, hubicka@ucw.cz, gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-11.7 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}.