+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.
+
2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (*stack_push, *stack_pop): Use
&& s390_non_addr_reg_read_p (*op0, prev_insn))
{
if (REGNO (*op1) == 0)
- emit_insn_after (gen_nop1 (), insn);
+ emit_insn_after (gen_nop_lr1 (), insn);
else
- emit_insn_after (gen_nop (), insn);
+ emit_insn_after (gen_nop_lr0 (), insn);
insn_added_p = true;
}
else
UNSPECV_CAS
UNSPECV_ATOMIC_OP
+ ; Non-branch nops used for compare-and-branch adjustments on z10
+ UNSPECV_NOP_LR_0
+ UNSPECV_NOP_LR_1
+
; Hotpatching (unremovable NOPs)
UNSPECV_NOP_2_BYTE
UNSPECV_NOP_4_BYTE
(define_insn "nop"
[(const_int 0)]
""
+ "nopr\t%%r0"
+ [(set_attr "op_type" "RR")])
+
+; non-branch NOPs required for optimizing compare-and-branch patterns
+; on z10
+
+(define_insn "nop_lr0"
+ [(unspec_volatile [(const_int 0)] UNSPECV_NOP_LR_0)]
+ ""
"lr\t0,0"
[(set_attr "op_type" "RR")
(set_attr "z10prop" "z10_fr_E1")])
-(define_insn "nop1"
- [(const_int 1)]
+(define_insn "nop_lr1"
+ [(unspec_volatile [(const_int 0)] UNSPECV_NOP_LR_1)]
""
"lr\t1,1"
[(set_attr "op_type" "RR")])
+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.
+
2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* c-c++-common/Wattributes.c: Disable warning for s390* target and
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* Without optimization extra NOPs will be added just to attach
+ location info to it. Don't run the test in that case. The torture
+ framework always appears to run the testcase without -O option
+ first. */
+
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
+
#include <stdio.h>
void hp1(void)
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=999,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,2" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,2 -mhotpatch=0,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,2" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,1" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,2" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,3" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,4" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,5" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,6" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile { target { ! lp64 } } } */
/* { dg-options "-mesa -march=g5 -Wno-deprecated -mhotpatch=0,3" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
/* { dg-do compile { target { ! lp64 } } } */
/* { dg-options "-mesa -march=g5 -Wno-deprecated -mhotpatch=0,4" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
# Additional hotpatch torture tests.
torture-init
-set-torture-options [list -Os -O0 -O1 -O2 -O3]
+set-torture-options [list -Os -O1 -O2 -O3]
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/hotpatch-\[0-9\]*.c]] \
"" $DEFAULT_CFLAGS
torture-finish