From 1ef9531bf7fbc3901759f8fb595e28401492c765 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 26 Mar 2002 19:03:18 -0800 Subject: [PATCH] alpha.c (alpha_emit_set_const): Add a REG_EQUAL note if a non-trivial load was emitted. * config/alpha/alpha.c (alpha_emit_set_const): Add a REG_EQUAL note if a non-trivial load was emitted. (alpha_emit_set_const_1): Remove obsolete extension. Fix thinko in high+extra+low case. From-SVN: r51428 --- gcc/ChangeLog | 7 +++++++ gcc/config/alpha/alpha.c | 24 +++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 700d51d..946f695 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2002-03-26 Richard Henderson + * config/alpha/alpha.c (alpha_emit_set_const): Add a REG_EQUAL note + if a non-trivial load was emitted. + (alpha_emit_set_const_1): Remove obsolete extension. Fix thinko + in high+extra+low case. + +2002-03-26 Richard Henderson + * config.gcc (sparc*-solaris): Use float_format=sparc. 2002-03-26 Richard Henderson diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index 708d035..6893677 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -2250,8 +2250,18 @@ alpha_emit_set_const (target, mode, c, n) } /* Try 1 insn, then 2, then up to N. */ - for (i = 1; i <= n && result == 0; i++) - result = alpha_emit_set_const_1 (target, mode, c, i); + for (i = 1; i <= n; i++) + { + result = alpha_emit_set_const_1 (target, mode, c, i); + if (result) + { + rtx insn = get_last_insn (); + rtx set = single_set (insn); + if (! CONSTANT_P (SET_SRC (set))) + set_unique_reg_note (get_last_insn (), REG_EQUAL, GEN_INT (c)); + break; + } + } /* Allow for the case where we changed the mode of TARGET. */ if (result == target) @@ -2276,15 +2286,6 @@ alpha_emit_set_const_1 (target, mode, c, n) = (flag_expensive_optimizations && !no_new_pseudos ? 0 : target); rtx temp, insn; -#if HOST_BITS_PER_WIDE_INT == 64 - /* We are only called for SImode and DImode. If this is SImode, ensure that - we are sign extended to a full word. This does not make any sense when - cross-compiling on a narrow machine. */ - - if (mode == SImode) - c = ((c & 0xffffffff) ^ 0x80000000) - 0x80000000; -#endif - /* If this is a sign-extended 32-bit constant, we can do this in at most three insns, so do it if we have enough insns left. We always have a sign-extended 32-bit constant when compiling on a narrow machine. */ @@ -2337,6 +2338,7 @@ alpha_emit_set_const_1 (target, mode, c, n) insn = gen_rtx_PLUS (mode, temp, GEN_INT (extra << 16)); insn = gen_rtx_SET (VOIDmode, subtarget, insn); emit_insn (insn); + temp = subtarget; } if (target == NULL) -- 2.7.4