* config/alpha/alpha.c (alpha_emit_set_const): Add a REG_EQUAL note
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Mar 2002 03:03:18 +0000 (03:03 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 27 Mar 2002 03:03:18 +0000 (03:03 +0000)
        if a non-trivial load was emitted.
        (alpha_emit_set_const_1): Remove obsolete extension.  Fix thinko
        in high+extra+low case.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51428 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/alpha/alpha.c

index 700d51d..946f695 100644 (file)
@@ -1,5 +1,12 @@
 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.
 
 2002-03-26  Richard Henderson  <rth@redhat.com>
index 708d035..6893677 100644 (file)
@@ -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)