diff options
author | kan <kan@FreeBSD.org> | 2002-10-10 04:40:18 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2002-10-10 04:40:18 +0000 |
commit | 92318bc515d223b2eeebb665f76e131dd2318b2b (patch) | |
tree | f505e08c93c8d3d8e51f5dac050b459cce4d4ae2 /contrib/gcc/reload1.c | |
parent | 48f00f4c43af857e09b5f961c806a8811c504a3c (diff) | |
download | FreeBSD-src-92318bc515d223b2eeebb665f76e131dd2318b2b.zip FreeBSD-src-92318bc515d223b2eeebb665f76e131dd2318b2b.tar.gz |
Gcc 3.2.1-prerelease from the FSF anoncvs repo gcc-3_2-branch on October 9th 2002 20:15 EST.
Diffstat (limited to 'contrib/gcc/reload1.c')
-rw-r--r-- | contrib/gcc/reload1.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/contrib/gcc/reload1.c b/contrib/gcc/reload1.c index 0ce10c4..9782f3a 100644 --- a/contrib/gcc/reload1.c +++ b/contrib/gcc/reload1.c @@ -7354,6 +7354,9 @@ gen_reload (out, in, opnum, type) { rtx last = get_last_insn (); rtx tem; +#ifdef SECONDARY_MEMORY_NEEDED + int in_regnum, out_regnum; +#endif /* If IN is a paradoxical SUBREG, remove it and try to put the opposite SUBREG on OUT. Likewise for a paradoxical SUBREG on OUT. */ @@ -7516,20 +7519,22 @@ gen_reload (out, in, opnum, type) #ifdef SECONDARY_MEMORY_NEEDED /* If we need a memory location to do the move, do it that way. */ - else if (GET_CODE (in) == REG && REGNO (in) < FIRST_PSEUDO_REGISTER - && GET_CODE (out) == REG && REGNO (out) < FIRST_PSEUDO_REGISTER - && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (REGNO (in)), - REGNO_REG_CLASS (REGNO (out)), + else if ((in_regnum = true_regnum (in)) >= 0 + && in_regnum < FIRST_PSEUDO_REGISTER + && (out_regnum = true_regnum (out)) >= 0 + && out_regnum < FIRST_PSEUDO_REGISTER + && SECONDARY_MEMORY_NEEDED (REGNO_REG_CLASS (in_regnum), + REGNO_REG_CLASS (out_regnum), GET_MODE (out))) { /* Get the memory to use and rewrite both registers to its mode. */ rtx loc = get_secondary_mem (in, GET_MODE (out), opnum, type); if (GET_MODE (loc) != GET_MODE (out)) - out = gen_rtx_REG (GET_MODE (loc), REGNO (out)); + out = gen_rtx_REG (GET_MODE (loc), out_regnum); if (GET_MODE (loc) != GET_MODE (in)) - in = gen_rtx_REG (GET_MODE (loc), REGNO (in)); + in = gen_rtx_REG (GET_MODE (loc), in_regnum); gen_reload (loc, in, opnum, type); gen_reload (out, loc, opnum, type); @@ -7581,6 +7586,11 @@ delete_output_reload (insn, j, last_reload_reg) rtx i1; rtx substed; + /* It is possible that this reload has been only used to set another reload + we eliminated earlier and thus deleted this instruction too. */ + if (INSN_DELETED_P (output_reload_insn)) + return; + /* Get the raw pseudo-register referred to. */ while (GET_CODE (reg) == SUBREG) |