public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/77882] [Aarch64] Add 'naked' function attribute
       [not found] <bug-77882-4@http.gcc.gnu.org/bugzilla/>
@ 2022-05-25  6:39 ` i at maskray dot me
  2022-05-25  6:45 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: i at maskray dot me @ 2022-05-25  6:39 UTC (permalink / raw)
  To: gcc-bugs

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

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |i at maskray dot me

--- Comment #11 from Fangrui Song <i at maskray dot me> ---
The number of targets supporting this attribute is large but the popular
aarch64 somehow doesn't support it... I just run into a case where supporting
this would be nice (https://reviews.llvm.org/D126343#3536318).

% grep 'naked.*function attribute,' gcc/doc/extend.texi
@cindex @code{naked} function attribute, ARC
@cindex @code{naked} function attribute, ARM
@cindex @code{naked} function attribute, AVR
@cindex @code{naked} function attribute, C-SKY
@cindex @code{naked} function attribute, MCORE
@cindex @code{naked} function attribute, MSP430
@cindex @code{naked} function attribute, NDS32
@cindex @code{naked} function attribute, RISC-V
@cindex @code{naked} function attribute, RL78
@cindex @code{naked} function attribute, RX
@cindex @code{naked} function attribute, x86

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

* [Bug target/77882] [Aarch64] Add 'naked' function attribute
       [not found] <bug-77882-4@http.gcc.gnu.org/bugzilla/>
  2022-05-25  6:39 ` [Bug target/77882] [Aarch64] Add 'naked' function attribute i at maskray dot me
@ 2022-05-25  6:45 ` pinskia at gcc dot gnu.org
  2023-01-17 15:28 ` stefan.tauner at gmx dot at
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-05-25  6:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Fangrui Song from comment #11)
> The number of targets supporting this attribute is large but the popular
> aarch64 somehow doesn't support it... I just run into a case where
> supporting this would be nice (https://reviews.llvm.org/D126343#3536318).

That is not really a good use case really. a testcase is general purpose use
case.

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

* [Bug target/77882] [Aarch64] Add 'naked' function attribute
       [not found] <bug-77882-4@http.gcc.gnu.org/bugzilla/>
  2022-05-25  6:39 ` [Bug target/77882] [Aarch64] Add 'naked' function attribute i at maskray dot me
  2022-05-25  6:45 ` pinskia at gcc dot gnu.org
@ 2023-01-17 15:28 ` stefan.tauner at gmx dot at
  2024-04-08 18:39 ` ndesaulniers at google dot com
  2024-04-08 19:25 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: stefan.tauner at gmx dot at @ 2023-01-17 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

stefan.tauner at gmx dot at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stefan.tauner at gmx dot at

--- Comment #13 from stefan.tauner at gmx dot at ---
Please reconsider this. I ran into this when debugging pointer authentication
not working correctly where I have to replace the prologue of a specific
existing non-trivial C function. This would be way easier with this attribute
and some inline assembly than replacing the whole function.

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

* [Bug target/77882] [Aarch64] Add 'naked' function attribute
       [not found] <bug-77882-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2023-01-17 15:28 ` stefan.tauner at gmx dot at
@ 2024-04-08 18:39 ` ndesaulniers at google dot com
  2024-04-08 19:25 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: ndesaulniers at google dot com @ 2024-04-08 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

Nick Desaulniers <ndesaulniers at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ndesaulniers at google dot com

--- Comment #14 from Nick Desaulniers <ndesaulniers at google dot com> ---
Adding a data point from
https://discourse.llvm.org/t/hand-written-in-assembly-in-libc-setjmp-longjmp/73249/9.

It's becoming a code portability issue when clang supports this function
attribute on functions for aarch64 targets but GCC does not.

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

* [Bug target/77882] [Aarch64] Add 'naked' function attribute
       [not found] <bug-77882-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2024-04-08 18:39 ` ndesaulniers at google dot com
@ 2024-04-08 19:25 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-08 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Nick Desaulniers from comment #14)
> Adding a data point from
> https://discourse.llvm.org/t/hand-written-in-assembly-in-libc-setjmp-longjmp/
> 73249/9.
> 
> It's becoming a code portability issue when clang supports this function
> attribute on functions for aarch64 targets but GCC does not.

Not really since you still can use a .s (or .S) file there .... That is how all
other libc implement their setjmp/longjump and even correctly. Some will even
use a generator to get the offsets and/or use static_asserts to make sure
offsets stay correct.

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

end of thread, other threads:[~2024-04-08 19:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-77882-4@http.gcc.gnu.org/bugzilla/>
2022-05-25  6:39 ` [Bug target/77882] [Aarch64] Add 'naked' function attribute i at maskray dot me
2022-05-25  6:45 ` pinskia at gcc dot gnu.org
2023-01-17 15:28 ` stefan.tauner at gmx dot at
2024-04-08 18:39 ` ndesaulniers at google dot com
2024-04-08 19:25 ` pinskia at gcc dot gnu.org

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).