aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.cc
diff options
context:
space:
mode:
authorAndreas Krebbel <krebbel@linux.ibm.com>2023-02-01 08:59:42 +0100
committerAndreas Krebbel <krebbel@linux.ibm.com>2023-02-01 08:59:42 +0100
commit8091199cdf4d0aa9c28e4526548ddc25d02898ca (patch)
treeb3a7ff9843c9023cf8b4e61abc061472c2fd1cf7 /gcc/gcc.cc
parent36ffb2e0293d1bbef30e3553a431679de00549b9 (diff)
downloadgcc-8091199cdf4d0aa9c28e4526548ddc25d02898ca.zip
gcc-8091199cdf4d0aa9c28e4526548ddc25d02898ca.tar.gz
gcc-8091199cdf4d0aa9c28e4526548ddc25d02898ca.tar.bz2
IBM zSystems: Save argument registers to the stack -mpreserve-args
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. With the -mpreserve-args option GPRs and FPRs are save to the stack slots which are reserved for stdargs in the register save area. gcc/ChangeLog: * config/s390/s390.cc (s390_restore_gpr_p): New function. (s390_preserve_gpr_arg_in_range_p): New function. (s390_preserve_gpr_arg_p): New function. (s390_preserve_fpr_arg_p): New function. (s390_register_info_stdarg_fpr): Rename to ... (s390_register_info_arg_fpr): ... this. Add -mpreserve-args handling. (s390_register_info_stdarg_gpr): Rename to ... (s390_register_info_arg_gpr): ... this. Add -mpreserve-args handling. (s390_register_info): Use the renamed functions above. (s390_optimize_register_info): Likewise. (save_fpr): Generate CFI for -mpreserve-args. (save_gprs): Generate CFI for -mpreserve-args. Drop return value. (s390_emit_prologue): Adjust to changed calling convention of save_gprs. (s390_optimize_prologue): Likewise. * config/s390/s390.opt: New option -mpreserve-args gcc/testsuite/ChangeLog: * gcc.target/s390/preserve-args-1.c: New test. * gcc.target/s390/preserve-args-2.c: New test.
Diffstat (limited to 'gcc/gcc.cc')
0 files changed, 0 insertions, 0 deletions