From: Richard Kenner Date: Fri, 31 Jul 1992 12:11:54 +0000 (-0400) Subject: *** empty log message *** X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=510dd77e9569867570a74513c79eb767344370c6;p=gcc.git *** empty log message *** From-SVN: r1730 --- diff --git a/gcc/combine.c b/gcc/combine.c index b3865ed06d2..ab9b09d1a62 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -8095,6 +8095,18 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1) if (XEXP (note, 0) == elim_i2 || XEXP (note, 0) == elim_i1) break; + /* If the register is used in both I2 and I3 and it dies in I3, + we might have added another reference to it. If reg_n_refs + was 2, bump it to 3. This has to be correct since the + register must have been set somewhere. The reason this is + done is because local-alloc.c treats 2 references as a + special case. */ + + if (place == i3 && i2 != 0 && GET_CODE (XEXP (note, 0)) == REG + && reg_n_refs[REGNO (XEXP (note, 0))]== 2 + && reg_referenced_p (XEXP (note, 0), PATTERN (i2))) + reg_n_refs[REGNO (XEXP (note, 0))] = 3; + if (place == 0) for (tem = prev_nonnote_insn (i3); tem && (GET_CODE (tem) == INSN diff --git a/gcc/final.c b/gcc/final.c index e44f77c1266..fb483db9107 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2078,6 +2078,13 @@ output_operand (x, code) { if (x && GET_CODE (x) == SUBREG) x = alter_subreg (x); + + /* If X is a pseudo-register, abort now rather than writing trash to the + assembler file. */ + + if (GET_CODE (x) == REG && REGNO (x) >= FIRST_PSEUDO_REGISTER) + abort (); + PRINT_OPERAND (asm_out_file, x, code); } diff --git a/gcc/reload1.c b/gcc/reload1.c index fcf423625f6..46274374ce1 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -3321,7 +3321,7 @@ reload_as_needed (first, live_known) for (i = 0; i < NUM_ELIMINABLE_REGS; i++) { INITIAL_ELIMINATION_OFFSET (reg_eliminate[i].from, reg_eliminate[i].to, - reg_eliminate[i].initial_offset) + reg_eliminate[i].initial_offset); reg_eliminate[i].previous_offset = reg_eliminate[i].offset = reg_eliminate[i].initial_offset; }