This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
patch: powerpc CALL_REALLY_USED_REGISTERS
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: gcc patches <gcc-patches at gcc dot gnu dot org>
- Cc: David Edelsohn <dje at watson dot ibm dot com>
- Date: 28 Nov 2001 22:10:14 -0600
- Subject: patch: powerpc CALL_REALLY_USED_REGISTERS
hi guys!
the prologue's set of VRSAVE is being deleted because flow thinks it is
a dead store. gcc may not use VRSAVE, but the OS does.
this patch sets CALL_REALLY_USED_REGISTERS to exactly the values for
CALL_USED_REGISTERS, modulo the VRSAVE entry, hence prohibiting flow
from deleting the prologue's set of VRSAVE.
bootstrapped and regtested on ppc linux.
ok?
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy
Red Hat, Inc.
2001-11-28 Aldy Hernandez <aldyh@redhat.com>
* rs6000.h (CALL_REALLY_USED_REGISTERS): New.
(CONDITIONAL_REGISTER_USAGE): Set call_really_used_registers for
altivec regs.
Index: config/rs6000/rs6000.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/rs6000/rs6000.h,v
retrieving revision 1.143
diff -c -p -r1.143 rs6000.h
*** rs6000.h 2001/11/22 02:19:56 1.143
--- rs6000.h 2001/11/28 18:17:42
*************** extern int rs6000_debug_arg; /* debug a
*** 725,730 ****
--- 725,747 ----
1 \
}
+ /* Like `CALL_USED_REGISTERS' except this macro doesn't require that
+ the entire set of `FIXED_REGISTERS' be included.
+ (`CALL_USED_REGISTERS' must be a superset of `FIXED_REGISTERS').
+ This macro is optional. If not specified, it defaults to the value
+ of `CALL_USED_REGISTERS'. */
+
+ #define CALL_REALLY_USED_REGISTERS \
+ {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, FIXED_R13, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, \
+ /* AltiVec registers. */ \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 0 \
+ }
#define MQ_REGNO 64
#define CR0_REGNO 68
*************** extern int rs6000_debug_arg; /* debug a
*** 941,950 ****
= call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
if (! TARGET_ALTIVEC) \
for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) \
! fixed_regs[i] = call_used_regs[i] = 1; \
if (TARGET_ALTIVEC_ABI) \
for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i) \
! call_used_regs[i] = 1; \
}
/* Specify the registers used for certain standard purposes.
--- 958,967 ----
= call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
if (! TARGET_ALTIVEC) \
for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i) \
! fixed_regs[i] = call_used_regs[i] = call_really_used_regs[i] = 1; \
if (TARGET_ALTIVEC_ABI) \
for (i = FIRST_ALTIVEC_REGNO; i < FIRST_ALTIVEC_REGNO + 20; ++i) \
! call_used_regs[i] = call_really_used_regs[i] = 1; \
}
/* Specify the registers used for certain standard purposes.