]> git.ipfire.org Git - thirdparty/gcc.git/commit
Darwin, PPC : Fix R13 for PPC64.
authorIain Sandoe <iain@sandoe.co.uk>
Fri, 11 Dec 2020 00:29:42 +0000 (00:29 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 29 May 2022 19:03:57 +0000 (20:03 +0100)
commit18cb0117150855224da0e73776a3e0d2bb68e7e6
treeb947dac142452093119fd7af55450866e0a2107a
parentfcf079ac33c6378f28e69d7af088c2244072c210
Darwin, PPC : Fix R13 for PPC64.

We have a somewhat unusual situation in that for PPC64, R13 is
both reserved and callee-saved (it is used internally by the
pthreads implementation to contain pthread_self).

So add R13 to the fixed regs, but also keep it in the callee-
saved set.

gcc/ChangeLog:

* config/rs6000/darwin.h (FIXED_R13): Add for PPC64.
(FIRST_SAVED_GP_REGNO): Save from R13 even when it is one
of the fixed regs.

(cherry picked from commit b12d6e79899fd27833c53ffc3c973538244f62e1)
gcc/config/rs6000/darwin.h