Commit b5d0b3d2 by Segher Boessenkool

rs6000: Fix safe-indirect-jump-[18].c

This patch merges the safe-indirect-jump-1.c and -8.c testcases,
since they do the same thing.  On the 64-bit and AIX ABIs the indirect
call is not a sibcall, since there is code generated after the call
(the restore of r2).  On the 32-bit non-AIX ABIs it is a sibcall.


	* gcc.target/powerpc/safe-indirect-jump-1.c: Build on all targets.
	Make expected output depend on whether we expect sibcalls or not.
	* gcc.target/powerpc/safe-indirect-jump-8.c: Delete (merged into
	safe-indirect-jump-1.c).

From-SVN: r257108
parent 5bb1c2be
2018-01-26 Segher Boessenkool <segher@kernel.crashing.org>
* gcc.target/powerpc/safe-indirect-jump-1.c: Build on all targets.
Make expected output depend on whether we expect sibcalls or not.
* gcc.target/powerpc/safe-indirect-jump-8.c: Delete (merged into
safe-indirect-jump-1.c).
2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
Soren Rasmussen <s.c.rasmussen@gmail.com>
Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
Soren Rasmussen <s.c.rasmussen@gmail.com>
Fortran 2018 teams tests.
......
/* { dg-do compile { target { lp64 } } } */
/* { dg-do compile } */
/* { dg-additional-options "-mno-speculate-indirect-jumps" } */
/* Test for deliberate misprediction of indirect calls. */
......@@ -11,4 +11,10 @@ int bar ()
}
/* { dg-final { scan-assembler "crset 2" } } */
/* { dg-final { scan-assembler "beqctrl-" } } */
/* The AIX and ELFv2 ABIs don't allow a sibcall here. */
/* { dg-final { scan-assembler "beqctrl-" { target { lp64 || { powerpc*-*-aix* } } } } } */
/* The other ABIs do allow a sibcall. */
/* { dg-final { scan-assembler "beqctr-" { target { ilp32 && !powerpc*-*-aix* } } } } */
/* { dg-final { scan-assembler {b \$} { target { ilp32 && !powerpc*-*-aix* } } } } */
/* { dg-do compile { target { ilp32 } } } */
/* { dg-skip-if "" { powerpc*-*-aix* } } */
/* { dg-additional-options "-O2 -mno-speculate-indirect-jumps" } */
/* Test for deliberate misprediction of -m32 sibcalls. */
extern int (*f)();
int bar ()
{
return (*f) ();
}
/* { dg-final { scan-assembler "crset 2" } } */
/* { dg-final { scan-assembler "beqctr-" } } */
/* { dg-final { scan-assembler {b \$} } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment