From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 632EA3858D37 for ; Mon, 10 Oct 2022 06:07:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 632EA3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x632.google.com with SMTP id bj12so22586091ejb.13 for ; Sun, 09 Oct 2022 23:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dDWFcYcS9zI8o31iqVJncNuE3NgNxkMVOI9M5trcAnE=; b=VQVQRrbAUXTlufefT23d2VabfYSySuRrdX36Qq3vJ8pT9jaCApK+vtEQIu715a+0OO qt5ejnG36QrLdoKOiLfLvDEIYdo41AhkYPKcroaDdvuRcLfJs2CWMCOd9cM1KxMJFql5 l0S9wqLuWL28MdnGnAPoCepgHmGsYm530P0jNSeVQLHAMCSL1j/RjLPDRbUUZnjaFJyx ouESHEcNIRH8bca2dn8Pt+d3roL9TzjIVm5A03BxI4h1QlF6quLqFxmS+NRgG73aK+AS GmTgvR1z+zmI8iWd9AEkitDN4F+jHCIUsLOmyOKhONjhlSFTWYejIVJYfXNmc89iDaFi N4DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dDWFcYcS9zI8o31iqVJncNuE3NgNxkMVOI9M5trcAnE=; b=o5SmV0hABIDdQkEZeZhJhiMzPJILg2n9XlxgHX3DAiT/lnFyKS/TwUj5yKrwN2Q7bL HrlE8CO7iCrUdfyeOyFfAV2unx9YgP0kUM/lkJDTlwws8ToFYDRk+1/kLOfwWjRiLjA+ 7GTpUOutRVYrvCO+evvS5aQKKlmk0UsrM5w1a88zqKO0gxALAycFu8B5VsR+i8zo6CZH qKUu6WU3AVjf7U7LvjZcNfrmUWKiA/QJY8HSOY8CNGMi8X9+usWtWeRKT+HgxzerfLIS GPT66t/4SDAoSq03FTC8Rp8Vncobe1YFd7VesaaI1jSz5F8TVxchxLbzJSi3q9ClcP0Y NJBQ== X-Gm-Message-State: ACrzQf0k2siRMH0llHB16ygE2bc36392EsipApExKdDI8uGvyWe7F7O+ rWDE+QvAzk68qHAST10lD8sTNOycAAEoosV+wdQ= X-Google-Smtp-Source: AMsMyM7DindT3djFMQMjmIQT9Lb+UIT+NMga8sD2zMb5osrqR+XQ8wPz0jCXVDZo2wb7eU8j+ztJ9bBgA9uOGOGo+aw= X-Received: by 2002:a17:906:5d0f:b0:78d:1bed:890f with SMTP id g15-20020a1709065d0f00b0078d1bed890fmr13616395ejt.594.1665382052986; Sun, 09 Oct 2022 23:07:32 -0700 (PDT) MIME-Version: 1.0 References: <20221007134901.5078-1-palmer@rivosinc.com> In-Reply-To: <20221007134901.5078-1-palmer@rivosinc.com> From: Richard Biener Date: Mon, 10 Oct 2022 08:07:21 +0200 Message-ID: Subject: Re: [PATCH] doc: -falign-functions doesn't override the __attribute__((align(N))) To: Palmer Dabbelt Cc: gcc-patches@gcc.gnu.org, hubicka@ucw.cz Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 List-Id: On Fri, Oct 7, 2022 at 3:50 PM Palmer Dabbelt wrote: > > 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. Maybe also mention that the alignment doesn't apply to functions optimized for size? > 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}. > > -- > 2.34.1 >