public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Preserve argument registers
@ 2022-11-14 15:26 Andreas Krebbel
  2022-11-14 15:26 ` [PATCH 1/2] New reg note REG_CFA_NORESTORE Andreas Krebbel
  2022-11-14 15:26 ` [PATCH 2/2] IBM zSystems: Save argument registers to the stack -mpreserve-args Andreas Krebbel
  0 siblings, 2 replies; 3+ messages in thread
From: Andreas Krebbel @ 2022-11-14 15:26 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.

A small common code patch was needed to prevent the CFI verification
in dwarf2cfi from complaining about the register saves without restores.

Andreas Krebbel (2):
  New reg note REG_CFA_NORESTORE
  IBM zSystems: Save argument registers to the stack -mpreserve-args

 gcc/config/s390/s390.cc                       | 263 +++++++++++++-----
 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 ++
 6 files changed, 244 insertions(+), 79 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

-- 
2.38.1


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

end of thread, other threads:[~2022-11-14 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 15:26 [PATCH 0/2] Preserve argument registers Andreas Krebbel
2022-11-14 15:26 ` [PATCH 1/2] New reg note REG_CFA_NORESTORE Andreas Krebbel
2022-11-14 15:26 ` [PATCH 2/2] 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).