diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-03-01 07:31:19 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-03-01 07:31:19 -0500 |
commit | e2eb57b721527a5e8740fe5a25a90bb63cb7ee86 (patch) | |
tree | 58eaf115da32a38f5313ba93d06b0c245efe143b | |
parent | 5e2a751adc022f8afeffcb22182d79ff6e1d1cc2 (diff) | |
download | gcc-e2eb57b721527a5e8740fe5a25a90bb63cb7ee86.zip gcc-e2eb57b721527a5e8740fe5a25a90bb63cb7ee86.tar.gz gcc-e2eb57b721527a5e8740fe5a25a90bb63cb7ee86.tar.bz2 |
(subst_constants): Use proper mode when getting equivalent constant for paradoxical SUBREG in SET_DEST.
(subst_constants): Use proper mode when getting equivalent constant for
paradoxical SUBREG in SET_DEST.
(mark_stores): Clean up and tighten to properly handle hard regs.
From-SVN: r3574
-rw-r--r-- | gcc/integrate.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index c324fac..1b358e1 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -2411,7 +2411,8 @@ subst_constants (loc, insn, map) && GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))) <= UNITS_PER_WORD && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))) <= GET_MODE_SIZE (GET_MODE (dest))) - && (tem = gen_lowpart_if_possible (GET_MODE (dest), src))) + && (tem = gen_lowpart_if_possible (GET_MODE (SUBREG_REG (dest)), + src))) src = tem, dest = SUBREG_REG (dest); /* If storing a recognizable value save it for later recording. */ @@ -2537,11 +2538,29 @@ mark_stores (dest, x) rtx dest; rtx x; { - if (GET_CODE (dest) == SUBREG) - dest = SUBREG_REG (dest); + int regno = -1; + enum machine_mode mode; + + /* DEST is always the innermost thing set, except in the case of + SUBREGs of hard registers. */ if (GET_CODE (dest) == REG) - global_const_equiv_map[REGNO (dest)] = 0; + regno = REGNO (dest), mode = GET_MODE (dest); + else if (GET_CODE (dest) == SUBREG && GET_CODE (SUBREG_REG (dest)) == REG) + { + regno = REGNO (SUBREG_REG (dest)) + SUBREG_WORD (dest); + mode = GET_MODE (SUBREG_REG (dest)); + } + + if (regno >= 0) + { + int last_reg = (regno >= FIRST_PSEUDO_REGISTER ? regno + : regno + HARD_REGNO_NREGS (regno, mode) - 1); + int i; + + for (i = regno; i <= last_reg; i++) + global_const_equiv_map[i] = 0; + } } /* If any CONST expressions with RTX_INTEGRATED_P are present in the rtx |