From: danglin Date: Tue, 13 Jul 2004 22:17:11 +0000 (+0000) Subject: * pa-64.h (ARG_POINTER_REGNUM, STATIC_CHAIN_REGNUM): Delete. X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=ab1fc984afbabfa0b31ff83b1b2384d6ebd5c3f0 * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84649 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e71184813c..cf390c0cb58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-07-13 John David Anglin + + * 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 PR tree-optimization/16443 diff --git a/gcc/config/pa/pa-64.h b/gcc/config/pa/pa-64.h index 94671e40f5e..18e8f2a92b2 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 dd6f356f3d0..2d60573de58 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 3a51324c8fc..d2ba2f68377 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 d2f4ace79be..75226960d3e 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