]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000 - Fix PR target/88343
authoriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Dec 2018 08:53:49 +0000 (08:53 +0000)
committeriains <iains@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Dec 2018 08:53:49 +0000 (08:53 +0000)
commit0edf78b1b2a0cc9277cecb44e8a32525b2f89f0d
tree429f0291958333f58e2c6ef01fb36188c136775a
parent6b760973b515367da74791b5bdfaa825d251536b
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
gcc/ChangeLog
gcc/config/rs6000/rs6000.c