public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/94381] New: -falign-function/-falign-labels/-falign-loops documentation is inaccurate
@ 2020-03-28 14:11 hjl.tools at gmail dot com
  2020-03-28 14:33 ` [Bug driver/94381] " hjl.tools at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2020-03-28 14:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94381

            Bug ID: 94381
           Summary: -falign-function/-falign-labels/-falign-loops
                    documentation is inaccurate
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com, skpgkp2 at gmail dot com
  Target Milestone: ---

'-falign-functions'
'-falign-functions=N'
'-falign-functions=N:M'
'-falign-functions=N:M:N2'
'-falign-functions=N:M:N2:M2'
     Align the start of functions to the next power-of-two greater than
     N, skipping up to M-1 bytes.

But

[hjl@gnu-cfl-2 align]$ cat y.i
void
foo (void)
{
}
[hjl@gnu-cfl-2 align]$ gcc -O2 -S -falign-functions=4 y.i
[hjl@gnu-cfl-2 align]$ cat y.s
        .file   "y.i"
        .text
        .p2align 2 <<<<<<<< 4 is not the next power-of-two greater than 4.
        .globl  foo
        .type   foo, @function
foo:
.LFB0:
        .cfi_startproc
        ret
        .cfi_endproc
.LFE0:
        .size   foo, .-foo
        .ident  "GCC: (GNU) 9.3.1 20200317 (Red Hat 9.3.1-1)"
        .section        .note.GNU-stack,"",@progbits
[hjl@gnu-cfl-2 align]$ 

It should be "the next power-of-two no less than N".

'-falign-labels'
'-falign-labels=N'
'-falign-labels=N:M'
'-falign-labels=N:M:N2'
'-falign-labels=N:M:N2:M2'
     Align all branch targets to a power-of-two boundary.

and

'-falign-loops'
'-falign-loops=N'
'-falign-loops=N:M'
'-falign-loops=N:M:N2'
'-falign-loops=N:M:N2:M2'
     Align loops to a power-of-two boundary.  

may leave an impression of alignment is N to the power-of-two.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug driver/94381] -falign-function/-falign-labels/-falign-loops documentation is inaccurate
  2020-03-28 14:11 [Bug driver/94381] New: -falign-function/-falign-labels/-falign-loops documentation is inaccurate hjl.tools at gmail dot com
@ 2020-03-28 14:33 ` hjl.tools at gmail dot com
  2020-03-28 21:36 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2020-03-28 14:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94381

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-03-28
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
Also

'-falign-loops'
'-falign-loops=N'
'-falign-loops=N:M'
'-falign-loops=N:M:N2'
'-falign-loops=N:M:N2:M2'

and

'-falign-jumps'
'-falign-jumps=N'
'-falign-jumps=N:M'
'-falign-jumps=N:M:N2'
'-falign-jumps=N:M:N2:M2'

specify the maximum alignment.  The actual alignment is also controlled by

'-falign-labels'
'-falign-labels=N'
'-falign-labels=N:M'
'-falign-labels=N:M:N2'
'-falign-labels=N:M:N2:M2'

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug driver/94381] -falign-function/-falign-labels/-falign-loops documentation is inaccurate
  2020-03-28 14:11 [Bug driver/94381] New: -falign-function/-falign-labels/-falign-loops documentation is inaccurate hjl.tools at gmail dot com
  2020-03-28 14:33 ` [Bug driver/94381] " hjl.tools at gmail dot com
@ 2020-03-28 21:36 ` hjl.tools at gmail dot com
  2020-03-29 22:57 ` cvs-commit at gcc dot gnu.org
  2020-03-29 22:58 ` hjl.tools at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2020-03-28 21:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94381

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2020-March/5
                   |                            |42861.html
   Target Milestone|---                         |10.0
           Keywords|                            |patch

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch is posted at

https://gcc.gnu.org/pipermail/gcc-patches/2020-March/542861.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug driver/94381] -falign-function/-falign-labels/-falign-loops documentation is inaccurate
  2020-03-28 14:11 [Bug driver/94381] New: -falign-function/-falign-labels/-falign-loops documentation is inaccurate hjl.tools at gmail dot com
  2020-03-28 14:33 ` [Bug driver/94381] " hjl.tools at gmail dot com
  2020-03-28 21:36 ` hjl.tools at gmail dot com
@ 2020-03-29 22:57 ` cvs-commit at gcc dot gnu.org
  2020-03-29 22:58 ` hjl.tools at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-29 22:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94381

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by H.J. Lu <hjl@gcc.gnu.org>:

https://gcc.gnu.org/g:dacc7effeead9ad3e63673f6957661c55e351eb9

commit r10-7454-gdacc7effeead9ad3e63673f6957661c55e351eb9
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sun Mar 29 15:54:42 2020 -0700

    doc: Update -falign-functions/-falign-loops/-falign-jumps

    Change -falign-functions=N to

        Align the start of functions to the next power-of-two greater than
        or equal to N.

    Add

        If '-falign-labels' is greater than this value, then its value is
        used instead.

    to -falign-loops=N and -falign-jumps=N.

            PR driver/94381
            * doc/invoke.texi: Update -falign-functions, -falign-loops and
            -falign-jumps documentation.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug driver/94381] -falign-function/-falign-labels/-falign-loops documentation is inaccurate
  2020-03-28 14:11 [Bug driver/94381] New: -falign-function/-falign-labels/-falign-loops documentation is inaccurate hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2020-03-29 22:57 ` cvs-commit at gcc dot gnu.org
@ 2020-03-29 22:58 ` hjl.tools at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2020-03-29 22:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94381

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for GCC 10.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-29 22:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-28 14:11 [Bug driver/94381] New: -falign-function/-falign-labels/-falign-loops documentation is inaccurate hjl.tools at gmail dot com
2020-03-28 14:33 ` [Bug driver/94381] " hjl.tools at gmail dot com
2020-03-28 21:36 ` hjl.tools at gmail dot com
2020-03-29 22:57 ` cvs-commit at gcc dot gnu.org
2020-03-29 22:58 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).