S/390: Implement -mnop-mcount
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 16 Jul 2018 14:41:57 +0000 (14:41 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Mon, 16 Jul 2018 14:41:57 +0000 (14:41 +0000)
commit79c2f6d7de59d5580d224b491d5600d20e3101fe
treeaa22e973a668c627cb3dda015a6ed4ec6bd6e1fa
parent605090dc791ab2495f021908edc4dc03851e06a6
S/390: Implement -mnop-mcount

On i386 the profiler call sequence always consists of 1 call
instruction, so -mnop-mcount generates a single nop with the same
length as a call. For S/390 longer sequences may be used in some
cases, so -mnop-mcount generates the corresponding amount of nops.

2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>

* config/s390/s390.c (s390_function_profiler): Generate nops
instead of profiler call sequences.
* config/s390/s390.opt: Add the new option.

2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/mnop-mcount-m31-fpic.c: New testcase.
* gcc.target/s390/mnop-mcount-m31-mzarch.c: New testcase.
* gcc.target/s390/mnop-mcount-m31.c: New testcase.
* gcc.target/s390/mnop-mcount-m64-mfentry.c: New testcase.
* gcc.target/s390/mnop-mcount-m64.c: New testcase.

From-SVN: r262734
gcc/ChangeLog
gcc/config/s390/s390.c
gcc/config/s390/s390.opt
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/mnop-mcount-m31-fpic.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/mnop-mcount-m31-mzarch.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/mnop-mcount-m31.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/mnop-mcount-m64-mfentry.c [new file with mode: 0644]
gcc/testsuite/gcc.target/s390/mnop-mcount-m64.c [new file with mode: 0644]