Commit 1ef9531b by Richard Henderson Committed by Richard Henderson

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
parent 62d3b526
2002-03-26 Richard Henderson <rth@redhat.com> 2002-03-26 Richard Henderson <rth@redhat.com>
* 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 <rth@redhat.com>
* config.gcc (sparc*-solaris): Use float_format=sparc. * config.gcc (sparc*-solaris): Use float_format=sparc.
2002-03-26 Richard Henderson <rth@redhat.com> 2002-03-26 Richard Henderson <rth@redhat.com>
......
...@@ -2250,8 +2250,18 @@ alpha_emit_set_const (target, mode, c, n) ...@@ -2250,8 +2250,18 @@ alpha_emit_set_const (target, mode, c, n)
} }
/* Try 1 insn, then 2, then up to N. */ /* Try 1 insn, then 2, then up to N. */
for (i = 1; i <= n && result == 0; i++) for (i = 1; i <= n; i++)
result = alpha_emit_set_const_1 (target, mode, c, 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. */ /* Allow for the case where we changed the mode of TARGET. */
if (result == target) if (result == target)
...@@ -2276,15 +2286,6 @@ alpha_emit_set_const_1 (target, mode, c, n) ...@@ -2276,15 +2286,6 @@ alpha_emit_set_const_1 (target, mode, c, n)
= (flag_expensive_optimizations && !no_new_pseudos ? 0 : target); = (flag_expensive_optimizations && !no_new_pseudos ? 0 : target);
rtx temp, insn; 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 /* 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 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. */ 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) ...@@ -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_PLUS (mode, temp, GEN_INT (extra << 16));
insn = gen_rtx_SET (VOIDmode, subtarget, insn); insn = gen_rtx_SET (VOIDmode, subtarget, insn);
emit_insn (insn); emit_insn (insn);
temp = subtarget;
} }
if (target == NULL) if (target == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment