rs6000 - Fix PR target/88343

The PR is about unnecessary saves of the pic base register, it shows on m32 Linux and m32/m64 Darwin.

The fix is to check that we are in a pic mode and that the picbase has actually been used.
As a bonus, some #ifdef’d TARGET_MACHO code is no longer required.

2018-12-12 Segher Boessenkool  <segher@kernel.crashing.org>
	   Iain Sandoe  <iain@sandoe.co.uk>

	PR target/88343
	* config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
	unless it has been used.
	(first_reg_to_save): Remove dead code.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267049 138bc75d-0d04-0410-961f-82ee72b054a4
2 files changed