[0/2] Preserve argument registers

Message ID 20221114152657.43632-1-krebbel@linux.ibm.com
Headers
Series Preserve argument registers |

Message

Andreas Krebbel Nov. 14, 2022, 3:26 p.m. UTC
  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