IBM Z: Use the dedicated NOP instructions for "nop"
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Fri, 6 Apr 2018 07:45:42 +0000 (07:45 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Fri, 6 Apr 2018 07:45:42 +0000 (07:45 +0000)
commitaad98a61044276f322dbdb9876e83ead7d8a9e60
treea9298538dcca93788364c3e520d19d6cc4791028
parentbce89076ce03ff9bcf89362477cff548a585bcdd
IBM Z: Use the dedicated NOP instructions for "nop"

We still use lr r0,r0 as a NOP instruction although we have some kind
of dedicated NOP instruction (nopr) which maps to a "branch never".

As a side-effect this fixes testcases scanning for NOPs
e.g. patchable_function_entry-*.

As another side-effect this makes it difficult to distingiush NOPs
generated for hotpatching from NOPs added when using -O0 to attach
location information to it.  Hence I had to make sure that the hotpatch
testcases get skipped when compiling without optimization.

gcc/ChangeLog:

2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
instructions.
* config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
constant definitions.
("nop"): lr 0,0 -> nopr r0
("nop_lr0", "nop_lr1"): New insn definitions.

gcc/testsuite/ChangeLog:

2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* gcc.target/s390/s390.exp: Remove -O0 from list of torture
options.
* gcc.target/s390/hotpatch-1.c: Skip when building without
optimization.
* gcc.target/s390/hotpatch-10.c: Likewise.
* gcc.target/s390/hotpatch-11.c: Likewise.
* gcc.target/s390/hotpatch-12.c: Likewise.
* gcc.target/s390/hotpatch-13.c: Likewise.
* gcc.target/s390/hotpatch-14.c: Likewise.
* gcc.target/s390/hotpatch-15.c: Likewise.
* gcc.target/s390/hotpatch-16.c: Likewise.
* gcc.target/s390/hotpatch-17.c: Likewise.
* gcc.target/s390/hotpatch-18.c: Likewise.
* gcc.target/s390/hotpatch-19.c: Likewise.
* gcc.target/s390/hotpatch-2.c: Likewise.
* gcc.target/s390/hotpatch-3.c: Likewise.
* gcc.target/s390/hotpatch-4.c: Likewise.
* gcc.target/s390/hotpatch-5.c: Likewise.
* gcc.target/s390/hotpatch-6.c: Likewise.
* gcc.target/s390/hotpatch-7.c: Likewise.
* gcc.target/s390/hotpatch-8.c: Likewise.
* gcc.target/s390/hotpatch-9.c: Likewise.

From-SVN: r259164
24 files changed:
gcc/ChangeLog
gcc/config/s390/s390.c
gcc/config/s390/s390.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/s390/hotpatch-1.c
gcc/testsuite/gcc.target/s390/hotpatch-10.c
gcc/testsuite/gcc.target/s390/hotpatch-11.c
gcc/testsuite/gcc.target/s390/hotpatch-12.c
gcc/testsuite/gcc.target/s390/hotpatch-13.c
gcc/testsuite/gcc.target/s390/hotpatch-14.c
gcc/testsuite/gcc.target/s390/hotpatch-15.c
gcc/testsuite/gcc.target/s390/hotpatch-16.c
gcc/testsuite/gcc.target/s390/hotpatch-17.c
gcc/testsuite/gcc.target/s390/hotpatch-18.c
gcc/testsuite/gcc.target/s390/hotpatch-19.c
gcc/testsuite/gcc.target/s390/hotpatch-2.c
gcc/testsuite/gcc.target/s390/hotpatch-3.c
gcc/testsuite/gcc.target/s390/hotpatch-4.c
gcc/testsuite/gcc.target/s390/hotpatch-5.c
gcc/testsuite/gcc.target/s390/hotpatch-6.c
gcc/testsuite/gcc.target/s390/hotpatch-7.c
gcc/testsuite/gcc.target/s390/hotpatch-8.c
gcc/testsuite/gcc.target/s390/hotpatch-9.c
gcc/testsuite/gcc.target/s390/s390.exp