diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1994-12-28 18:17:58 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1994-12-28 18:17:58 -0800 |
commit | 369c7ab612f67350d529fc7b0a94d95a2d0e6a5e (patch) | |
tree | 46f60b85fef073407d3144159efe02f1bc92bcc6 /gcc | |
parent | 581d4b9d55cea8af6d272b699a114a947468dd46 (diff) | |
download | gcc-369c7ab612f67350d529fc7b0a94d95a2d0e6a5e.zip gcc-369c7ab612f67350d529fc7b0a94d95a2d0e6a5e.tar.gz gcc-369c7ab612f67350d529fc7b0a94d95a2d0e6a5e.tar.bz2 |
(find_equiv_reg): Exclude registers clobbered in the
CALL_INSN_FUNCTION_USAGE field of a CALL_INSN.
From-SVN: r8696
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index f5dd659..e739c6c 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5584,6 +5584,51 @@ find_equiv_reg (goal, insn, class, other, reload_reg_p, goalreg, mode) } } + if (GET_CODE (p) == CALL_INSN && CALL_INSN_FUNCTION_USAGE (p)) + { + rtx link; + + for (link = CALL_INSN_FUNCTION_USAGE (p); XEXP (link, 1) != 0; + link = XEXP (link, 1)) + { + pat = XEXP (link, 0); + if (GET_CODE (pat) == CLOBBER) + { + register rtx dest = SET_DEST (pat); + while (GET_CODE (dest) == SUBREG + || GET_CODE (dest) == ZERO_EXTRACT + || GET_CODE (dest) == SIGN_EXTRACT + || GET_CODE (dest) == STRICT_LOW_PART) + dest = XEXP (dest, 0); + if (GET_CODE (dest) == REG) + { + register int xregno = REGNO (dest); + int xnregs; + if (REGNO (dest) < FIRST_PSEUDO_REGISTER) + xnregs = HARD_REGNO_NREGS (xregno, GET_MODE (dest)); + else + xnregs = 1; + if (xregno < regno + nregs + && xregno + xnregs > regno) + return 0; + if (xregno < valueno + valuenregs + && xregno + xnregs > valueno) + return 0; + if (goal_mem_addr_varies + && reg_overlap_mentioned_for_reload_p (dest, + goal)) + return 0; + } + else if (goal_mem && GET_CODE (dest) == MEM + && ! push_operand (dest, GET_MODE (dest))) + return 0; + else if (need_stable_sp + && push_operand (dest, GET_MODE (dest))) + return 0; + } + } + } + #ifdef AUTO_INC_DEC /* If this insn auto-increments or auto-decrements either regno or valueno, return 0 now. |