testsuite: Enable zero-scratch-regs-{8,9,10,11}.c on s390*
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Sat, 17 Apr 2021 15:53:33 +0000 (17:53 +0200)
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Sat, 17 Apr 2021 15:53:33 +0000 (17:53 +0200)
commited16241c6db23013d70b792a64f29080ad48a414
treee879cb27fa6e19f1aac6f6fe94b2817b627af9fb
parentbda519596543e49f77914b5677693e86be5d01d0
testsuite: Enable zero-scratch-regs-{8,9,10,11}.c on s390*

On s390* the only missing part for the mentioned testcases was a load of
a double floating-point zero via a move (in particular for quite old
machines) which was added in commit 46c47420a5fefd4d9d02b0db347235dd74e20fb2.
Common code implementation is sufficient in order to clear volatile
GPRs, FPRs, and VRs.  Access registers a0 and a1 are nonvolatile and not
cleared.  Therefore, target hook TARGET_ZERO_CALL_USED_REGS is not
implemented for s390*.

Added a target specific test in order to ensure that all call clobbered
GPRs, FPRs, and VRs are zeroed and all call saved registers are kept.

gcc/testsuite/ChangeLog:

* c-c++-common/zero-scratch-regs-8.c: Enable on s390*.
* c-c++-common/zero-scratch-regs-9.c: Likewise.
* c-c++-common/zero-scratch-regs-10.c: Likewise.
* c-c++-common/zero-scratch-regs-11.c: Likewise.
* gcc.target/s390/zero-scratch-regs-1.c: New test.
gcc/testsuite/c-c++-common/zero-scratch-regs-10.c
gcc/testsuite/c-c++-common/zero-scratch-regs-11.c
gcc/testsuite/c-c++-common/zero-scratch-regs-8.c
gcc/testsuite/c-c++-common/zero-scratch-regs-9.c
gcc/testsuite/gcc.target/s390/zero-scratch-regs-1.c [new file with mode: 0644]