/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* Verify that ROP-protect instructions are inserted when a
call is present. */
/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect -mprivileged" } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* Verify that privileged ROP-protect instructions are inserted when a
call is present. */
/* { dg-do run { target { power10_hw } } } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
/* Verify that ROP-protect instructions execute correctly when a
/* { dg-do compile } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* Verify that no ROP-protect instructions are inserted when no
call is present. */
/* { dg-do compile } */
-/* { dg-require-effective-target powerpc_elfv2 } */
+/* { dg-require-effective-target rop_ok } */
/* { dg-options "-O2 -mdejagnu-cpu=power10 -mrop-protect" } */
/* Verify that __ROP_PROTECT__ is predefined for -mrop-protect. */
}
}
+# Return 1 if this is a PowerPC target supporting -mrop-protect
+
+proc check_effective_target_rop_ok { } {
+ return [check_effective_target_power10_ok]
+ && [check_effective_target_powerpc_elfv2]
+}
+
# The VxWorks SPARC simulator accepts only EM_SPARC executables and
# chokes on EM_SPARC32PLUS or EM_SPARCV9 executables. Return 1 if the
# test environment appears to run executables on such a simulator.