public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/iains/heads/d-for-darwin)] Darwin, PPC : Fix R13 for PPC64.
@ 2020-12-13 17:44 Iain D Sandoe
0 siblings, 0 replies; 3+ messages in thread
From: Iain D Sandoe @ 2020-12-13 17:44 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8b3f7c76973c1020a1638fdcd4168accf63a6641
commit 8b3f7c76973c1020a1638fdcd4168accf63a6641
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Fri Dec 11 00:29:42 2020 +0000
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.
Diff:
---
gcc/config/rs6000/darwin.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index ce27508afcb..627ca805498 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -203,7 +203,7 @@
/* Make both r2 and r13 available for allocation. */
#define FIXED_R2 0
-#define FIXED_R13 0
+#define FIXED_R13 TARGET_64BIT
/* Base register for access to local variables of the function. */
@@ -213,6 +213,9 @@
#undef RS6000_PIC_OFFSET_TABLE_REGNUM
#define RS6000_PIC_OFFSET_TABLE_REGNUM 31
+#undef FIRST_SAVED_GP_REGNO
+#define FIRST_SAVED_GP_REGNO 13
+
/* Darwin's stack must remain 16-byte aligned for both 32 and 64 bit
ABIs. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/iains/heads/d-for-darwin)] Darwin, PPC : Fix R13 for PPC64.
@ 2020-12-21 20:37 Iain D Sandoe
0 siblings, 0 replies; 3+ messages in thread
From: Iain D Sandoe @ 2020-12-21 20:37 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:982b68c15756ba973496be9514dbf6862432b942
commit 982b68c15756ba973496be9514dbf6862432b942
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Fri Dec 11 00:29:42 2020 +0000
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.
Diff:
---
gcc/config/rs6000/darwin.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index ce27508afcb..627ca805498 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -203,7 +203,7 @@
/* Make both r2 and r13 available for allocation. */
#define FIXED_R2 0
-#define FIXED_R13 0
+#define FIXED_R13 TARGET_64BIT
/* Base register for access to local variables of the function. */
@@ -213,6 +213,9 @@
#undef RS6000_PIC_OFFSET_TABLE_REGNUM
#define RS6000_PIC_OFFSET_TABLE_REGNUM 31
+#undef FIRST_SAVED_GP_REGNO
+#define FIRST_SAVED_GP_REGNO 13
+
/* Darwin's stack must remain 16-byte aligned for both 32 and 64 bit
ABIs. */
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/iains/heads/d-for-darwin)] Darwin, PPC : Fix R13 for PPC64.
@ 2021-01-11 21:26 Iain D Sandoe
0 siblings, 0 replies; 3+ messages in thread
From: Iain D Sandoe @ 2021-01-11 21:26 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:7ed10480e8a19fd8da0fb0e2ad118965e862ac9c
commit 7ed10480e8a19fd8da0fb0e2ad118965e862ac9c
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Fri Dec 11 00:29:42 2020 +0000
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.
Diff:
---
gcc/config/rs6000/darwin.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h
index 42f39e60305..566794af706 100644
--- a/gcc/config/rs6000/darwin.h
+++ b/gcc/config/rs6000/darwin.h
@@ -203,7 +203,7 @@
/* Make both r2 and r13 available for allocation. */
#define FIXED_R2 0
-#define FIXED_R13 0
+#define FIXED_R13 TARGET_64BIT
/* Base register for access to local variables of the function. */
@@ -213,6 +213,9 @@
#undef RS6000_PIC_OFFSET_TABLE_REGNUM
#define RS6000_PIC_OFFSET_TABLE_REGNUM 31
+#undef FIRST_SAVED_GP_REGNO
+#define FIRST_SAVED_GP_REGNO 13
+
/* Darwin's stack must remain 16-byte aligned for both 32 and 64 bit
ABIs. */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-11 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-13 17:44 [gcc(refs/users/iains/heads/d-for-darwin)] Darwin, PPC : Fix R13 for PPC64 Iain D Sandoe
2020-12-21 20:37 Iain D Sandoe
2021-01-11 21:26 Iain D Sandoe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).