[Bug target/96061] New: Please support 'no_caller_saved_registers' attribute on aarch64 (or maybe on all targets)

alex.popov at linux dot com gcc-bugzilla@gcc.gnu.org
Sat Jul 4 13:36:41 GMT 2020


            Bug ID: 96061
           Summary: Please support 'no_caller_saved_registers' attribute
                    on aarch64 (or maybe on all targets)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alex.popov at linux dot com
  Target Milestone: ---

This is an enhancement request.

GCC currently supports 'no_caller_saved_registers' attribute only for x86.
Clang supports it for all target architectures.

It would be very useful for Linux kernel, if GCC supported
'no_caller_saved_registers' attribute for at least aarch64. In particular, that
would allow to avoid useless work with caller-saved registers caused by
STACKLEAK GCC plugin instrumentation for the Linux kernel on aarch64.

This kernel patch uses 'no_caller_saved_registers' to fix the described issue
on x86:
(the patch is accepted for the mainline kernel)

That GCC enhancement can be useful for _mcount (gprof) as well.


More information about the Gcc-bugs mailing list