aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2004-07-13 22:17:11 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2004-07-13 22:17:11 +0000
commit747e2d0e5fdde755e67b659a23d8f62ce3927839 (patch)
tree7d04efdeee04f477592c3afb801d9bbcc8f3970f
parentc1b4f64d3344ab27b60754d40b5313a8947c49d3 (diff)
downloadgcc-747e2d0e5fdde755e67b659a23d8f62ce3927839.zip
gcc-747e2d0e5fdde755e67b659a23d8f62ce3927839.tar.gz
gcc-747e2d0e5fdde755e67b659a23d8f62ce3927839.tar.bz2
pa-64.h (ARG_POINTER_REGNUM, [...]): Delete.
* pa-64.h (ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Delete. * pa.h (ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Modify for hppa64. * pa32-regs.h (REG_ALLOC_ORDER): Reorder caller-saved registers. * pa64-regs.h (REG_ALLOC_ORDER): Likewise. From-SVN: r84649
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/pa/pa-64.h5
-rw-r--r--gcc/config/pa/pa.h4
-rw-r--r--gcc/config/pa/pa32-regs.h15
-rw-r--r--gcc/config/pa/pa64-regs.h18
5 files changed, 24 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0e71184..cf390c0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * pa-64.h (ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Delete.
+ * pa.h (ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Modify for hppa64.
+ * pa32-regs.h (REG_ALLOC_ORDER): Reorder caller-saved registers.
+ * pa64-regs.h (REG_ALLOC_ORDER): Likewise.
+
2004-07-13 Diego Novillo <dnovillo@redhat.com>
PR tree-optimization/16443
diff --git a/gcc/config/pa/pa-64.h b/gcc/config/pa/pa-64.h
index 94671e4..18e8f2a 100644
--- a/gcc/config/pa/pa-64.h
+++ b/gcc/config/pa/pa-64.h
@@ -74,17 +74,12 @@ Boston, MA 02111-1307, USA. */
?!? This may not work reliably. Keep an eye out for problems. */
#undef SECONDARY_MEMORY_NEEDED_RTX
-
/* ?!? This needs to be made compile-time selectable.
The PA64 runtime model has arguments that grow to higher addresses
(like most other targets). The older runtime model has arguments
that grow to lower addresses. What fun. */
#undef ARGS_GROW_DOWNWARD
-#undef ARG_POINTER_REGNUM
-#define ARG_POINTER_REGNUM 29
-#undef STATIC_CHAIN_REGNUM
-#define STATIC_CHAIN_REGNUM 31
/* If defined, a C expression which determines whether the default
implementation of va_arg will attempt to pad down before reading the
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index dd6f356..2d60573 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -533,10 +533,10 @@ do { \
do {(VAR) = - compute_frame_size (get_frame_size (), 0);} while (0)
/* Base register for access to arguments of the function. */
-#define ARG_POINTER_REGNUM 3
+#define ARG_POINTER_REGNUM (TARGET_64BIT ? 29 : 3)
/* Register in which static-chain is passed to a function. */
-#define STATIC_CHAIN_REGNUM 29
+#define STATIC_CHAIN_REGNUM (TARGET_64BIT ? 31 : 29)
/* Register used to address the offset table for position-independent
data references. */
diff --git a/gcc/config/pa/pa32-regs.h b/gcc/config/pa/pa32-regs.h
index 3a51324..d2ba2f6 100644
--- a/gcc/config/pa/pa32-regs.h
+++ b/gcc/config/pa/pa32-regs.h
@@ -119,7 +119,8 @@
registers will generally not be allocated across a call).
Experimentation has shown slightly better results by allocating
- FP registers first.
+ FP registers first. We allocate the caller-saved registers more
+ or less in reverse order to their allocation as arguments.
FP registers are ordered so that all L registers are selected before
R registers. This works around a false dependency interlock on the
@@ -130,14 +131,14 @@
{ \
/* caller-saved fp regs. */ \
68, 70, 72, 74, 76, 78, 80, 82, \
- 84, 86, 40, 42, 44, 46, 32, 34, \
- 36, 38, \
+ 84, 86, 40, 42, 44, 46, 38, 36, \
+ 34, 32, \
69, 71, 73, 75, 77, 79, 81, 83, \
- 85, 87, 41, 43, 45, 47, 33, 35, \
- 37, 39, \
+ 85, 87, 41, 43, 45, 47, 39, 37, \
+ 35, 33, \
/* caller-saved general regs. */ \
- 19, 20, 21, 22, 23, 24, 25, 26, \
- 27, 28, 29, 31, 2, \
+ 28, 19, 20, 21, 22, 31, 27, 29, \
+ 23, 24, 25, 26, 2, \
/* callee-saved fp regs. */ \
48, 50, 52, 54, 56, 58, 60, 62, \
64, 66, \
diff --git a/gcc/config/pa/pa64-regs.h b/gcc/config/pa/pa64-regs.h
index d2f4ace..7522696 100644
--- a/gcc/config/pa/pa64-regs.h
+++ b/gcc/config/pa/pa64-regs.h
@@ -118,22 +118,18 @@ Boston, MA 02111-1307, USA. */
registers will generally not be allocated across a call).
Experimentation has shown slightly better results by allocating
- FP registers first.
-
- FP registers are ordered so that all L registers are selected before
- R registers. This works around a false dependency interlock on the
- PA8000 when accessing the high and low parts of an FP register
- independently. */
+ FP registers first. We allocate the caller-saved registers more
+ or less in reverse order to their allocation as arguments. */
#define REG_ALLOC_ORDER \
{ \
/* caller-saved fp regs. */ \
50, 51, 52, 53, 54, 55, 56, 57, \
- 58, 59, 36, 37, 38, 39, 32, 33, \
- 34, 35, \
+ 58, 59, 39, 38, 37, 36, 35, 34, \
+ 33, 32, \
/* caller-saved general regs. */ \
- 19, 20, 21, 22, 23, 24, 25, 26, \
- 27, 28, 29, 31, 2, \
+ 28, 31, 19, 20, 21, 22, 23, 24, \
+ 25, 26, 29, 2, \
/* callee-saved fp regs. */ \
40, 41, 42, 43, 44, 45, 46, 47, \
48, 49, \
@@ -141,7 +137,7 @@ Boston, MA 02111-1307, USA. */
3, 4, 5, 6, 7, 8, 9, 10, \
11, 12, 13, 14, 15, 16, 17, 18, \
/* special registers. */ \
- 1, 30, 0, 60}
+ 1, 27, 30, 0, 60}
/* Return number of consecutive hard regs needed starting at reg REGNO