rs6000: Support ELFv2 sibcall for indirect calls [PR96787]
authorBill Schmidt <wschmidt@linux.ibm.com>
Thu, 27 Aug 2020 16:17:06 +0000 (11:17 -0500)
committerBill Schmidt <wschmidt@linux.ibm.com>
Thu, 27 Aug 2020 16:18:33 +0000 (11:18 -0500)
commitabca87c57847cd04f5e05935ff9ae5121c1ecb1d
treec77f5ea76e81b89c641e943c6a9e89f2f8c163fe
parentc336eda750d4e7a0827fedf995da955d6d88d5ca
rs6000: Support ELFv2 sibcall for indirect calls [PR96787]

Prior to P10, ELFv2 hasn't implemented nonlocal sibcalls.  Now that we do,
we need to be sure that r12 is set up prior to such a call.

2020-08-27  Bill Schmidt  <wschmidt@linux.ibm.com>

gcc/
PR target/96787
* config/rs6000/rs6000.c (rs6000_sibcall_aix): Support
indirect call for ELFv2.

gcc/testsuite/

PR target/96787
* gcc.target/powerpc/pr96787-1.c: New.
* gcc.target/powerpc/pr96787-2.c: New.
gcc/config/rs6000/rs6000.c
gcc/testsuite/gcc.target/powerpc/pr96787-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/pr96787-2.c [new file with mode: 0644]