public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Committed 0/3] IBM zSystems: Add -mpreserve-args option
@ 2023-02-01  8:04 Andreas Krebbel
  2023-02-01  8:04 ` [PATCH 1/3] New reg note REG_CFA_NORESTORE Andreas Krebbel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andreas Krebbel @ 2023-02-01  8:04 UTC (permalink / raw)
  To: gcc-patches

This adds support for preserving the content of parameter registers to
the stack and emit CFI for it. This useful for applications which want
to implement their own stack unwinding and need access to function
arguments without having to rely on debug information.

With the -mpreserve-args option GPRs and FPRs are save to the stack
slots which are reserved for stdargs in the register save area.

The introduction of REG_CFA_NORESTORE is a common code change which
has been approved last year already.

Bootstrapped and regtested on s390x. Committed to mainline. 

Andreas Krebbel (3):
  New reg note REG_CFA_NORESTORE
  IBM zSystems: Make stack_tie to work with hard frame pointer
  IBM zSystems: Save argument registers to the stack -mpreserve-args

 gcc/config/s390/s390.cc                       | 271 ++++++++++++------
 gcc/config/s390/s390.md                       |   5 +-
 gcc/config/s390/s390.opt                      |   4 +
 gcc/dwarf2cfi.cc                              |  15 +-
 gcc/reg-notes.def                             |   5 +
 .../gcc.target/s390/preserve-args-1.c         |  17 ++
 .../gcc.target/s390/preserve-args-2.c         |  19 ++
 .../gcc.target/s390/preserve-args-3.c         |  19 ++
 8 files changed, 265 insertions(+), 90 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/s390/preserve-args-1.c
 create mode 100644 gcc/testsuite/gcc.target/s390/preserve-args-2.c
 create mode 100644 gcc/testsuite/gcc.target/s390/preserve-args-3.c

-- 
2.39.1


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

end of thread, other threads:[~2023-02-01  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01  8:04 [Committed 0/3] IBM zSystems: Add -mpreserve-args option Andreas Krebbel
2023-02-01  8:04 ` [PATCH 1/3] New reg note REG_CFA_NORESTORE Andreas Krebbel
2023-02-01  8:04 ` [PATCH 2/3] IBM zSystems: Make stack_tie to work with hard frame-pointer Andreas Krebbel
2023-02-01  8:04 ` [PATCH 3/3] IBM zSystems: Save argument registers to the stack -mpreserve-args Andreas Krebbel

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