static void
s390_emit_stack_probe (rtx addr)
{
- rtx mem = gen_rtx_MEM (Pmode, addr);
+ rtx mem = gen_rtx_MEM (word_mode, addr);
MEM_VOLATILE_P (mem) = 1;
emit_insn (gen_probe_stack (mem));
}
}
}] "-march=z14 -m64 -mzarch" ] } { return 0 } else { return 1 }
}
+# Return 1 if the default compiler options enable z/Architecture mode
+proc check_effective_target_s390_zarch { } {
+ return [check_no_compiler_messages s390_zarch object {
+ int dummy[sizeof (int __attribute__((__mode__(__word__)))) == 8
+ ? 1 : -1];
+ }]
+}
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
/* We use a compare for the stack probe. There needs to be one inside
a loop and another for the remaining bytes. */
-/* { dg-final { scan-assembler-times "cg\t" 2 { target lp64 } } } */
-/* { dg-final { scan-assembler-times "c\t" 2 { target { ! lp64 } } } } */
+/* { dg-final { scan-assembler-times "cg\t" 2 { target s390_zarch } } } */
+/* { dg-final { scan-assembler-times "c\t" 2 { target { ! s390_zarch } } } } */
/* For alloca a common code routine emits the probes. Make sure the
"probe_stack" expander is used in that case. We want to use mem
compares instead of stores. */
-/* { dg-final { scan-assembler-times "cg\t" 5 { target lp64 } } } */
-/* { dg-final { scan-assembler-times "c\t" 5 { target { ! lp64 } } } } */
+/* { dg-final { scan-assembler-times "cg\t" 5 { target s390_zarch } } } */
+/* { dg-final { scan-assembler-times "c\t" 5 { target { ! s390_zarch } } } } */
/* For alloca a common code routine emits the probes. Make sure the
"probe_stack" expander is used in that case. We want to use mem
compares instead of stores. */
-/* { dg-final { scan-assembler-times "cg\t" 5 { target lp64 } } } */
-/* { dg-final { scan-assembler-times "c\t" 5 { target { ! lp64 } } } } */
+/* { dg-final { scan-assembler-times "cg\t" 5 { target s390_zarch } } } */
+/* { dg-final { scan-assembler-times "c\t" 5 { target { ! s390_zarch } } } } */
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O1 -m31 -mzarch -fstack-clash-protection" } */
+
+extern void bar (char*);
+
+void
+foo() {
+ char a[4000];
+ bar (a) ;
+}