From cc27ef7497f9b2df0a3a89809b848259ddc63d24 Mon Sep 17 00:00:00 2001 From: Joern Rennecke Date: Tue, 11 Feb 1997 19:59:59 +0000 Subject: [PATCH] (ELIMINABLE_REGS): updated comments. From-SVN: r13625 --- gcc/config/sh/sh.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index a2a312b..763048b 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -387,16 +387,27 @@ do { \ /* Definitions for register eliminations. - We have two registers that can be eliminated on the SH. First, the + We have three registers that can be eliminated on the SH. First, the frame pointer register can often be eliminated in favor of the stack pointer register. Secondly, the argument pointer register can always be - eliminated; it is replaced with either the stack or frame pointer. */ + eliminated; it is replaced with either the stack or frame pointer. + Third, there is the retuen address pointer, which can also be replaced + with either the stack or the frame pointer. */ /* This is an array of structures. Each structure initializes one pair of eliminable registers. The "from" register number is given first, followed by "to". Eliminations of the same "from" register are listed in order of preference. */ +/* If you add any registers here that are not actually hard registers, + and that have any alternative of elimination that doesn't always + apply, you need to amend calc_live_regs to exclude it, because + reload spills all eliminable registers where it sees an + can_eliminate == 0 entry, thus making them 'live' . + If you add any hard registers that can be eliminated in different + ways, you have to patch reload to spill them only when all alternatives + of elimination fail. */ + #define ELIMINABLE_REGS \ {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ -- 2.7.4