OSDN Git Service

2003-01-28 Dale Johannesen <dalej@apple.com>
authordalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2003 19:25:49 +0000 (19:25 +0000)
committerdalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Jan 2003 19:25:49 +0000 (19:25 +0000)
        * emit-rtl.c (const_double_htab_hash):  Use mode in the hash.
        * loop.c (scan_loop):  Move movables on -Os rich-register targets.
        * config/rs6000/rs6000.md (sibcall*):  Use match_operand for LR.

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

gcc/ChangeLog
gcc/config/rs6000/rs6000.md
gcc/emit-rtl.c
gcc/loop.c

index 808a3af..405ea85 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-28  Dale Johannesen  <dalej@apple.com>
+        * emit-rtl.c (const_double_htab_hash):  Use mode in the hash.
+        * loop.c (scan_loop):  Move movables on -Os rich-register targets.
+        * config/rs6000/rs6000.md (sibcall*):  Use match_operand for LR.
+
 2003-01-28  Richard Henderson  <rth@redhat.com>
 
        * target.h (targetm.address_cost): New.
index e35602b..34415c2 100644 (file)
   [(parallel [(call (mem:SI (match_operand 0 "address_operand" ""))
                    (match_operand 1 "" ""))
              (use (match_operand 2 "" ""))
-             (use (scratch:SI))
+             (use (match_operand 3 "" ""))
              (return)])]
   ""
   "
     abort ();
 
   operands[0] = XEXP (operands[0], 0);
+  operands[3] = gen_reg_rtx (SImode);
 
 }")
 
   [(call (mem:SI (match_operand:SI 0 "current_file_function_operand" "s,s"))
         (match_operand 1 "" "g,g"))
    (use (match_operand:SI 2 "immediate_operand" "O,n"))
-   (use (match_scratch:SI 3 "=l,l"))
+   (use (match_operand:SI 3 "register_operand" "l,l"))
    (return)]
   "(INTVAL (operands[2]) & CALL_LONG) == 0"
   "*
   [(call (mem:SI (match_operand:DI 0 "current_file_function_operand" "s,s"))
         (match_operand 1 "" "g,g"))
    (use (match_operand:SI 2 "immediate_operand" "O,n"))
-   (use (match_scratch:SI 3 "=l,l"))
+   (use (match_operand:SI 3 "register_operand" "l,l"))
    (return)]
   "TARGET_64BIT && (INTVAL (operands[2]) & CALL_LONG) == 0"
   "*
        (call (mem:SI (match_operand:SI 1 "current_file_function_operand" "s,s"))
              (match_operand 2 "" "g,g")))
    (use (match_operand:SI 3 "immediate_operand" "O,n"))
-   (use (match_scratch:SI 4 "=l,l"))
+   (use (match_operand:SI 4 "register_operand" "l,l"))
    (return)]
   "(INTVAL (operands[3]) & CALL_LONG) == 0"
   "*
        (call (mem:SI (match_operand:DI 1 "current_file_function_operand" "s,s"))
              (match_operand 2 "" "g,g")))
    (use (match_operand:SI 3 "immediate_operand" "O,n"))
-   (use (match_scratch:SI 4 "=l,l"))
+   (use (match_operand:SI 4 "register_operand" "l,l"))
    (return)]
   "TARGET_64BIT && (INTVAL (operands[3]) & CALL_LONG) == 0"
   "*
   [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s"))
         (match_operand 1 "" "g"))
    (use (match_operand:SI 2 "immediate_operand" "O"))
-   (use (match_scratch:SI 3 "=l"))
+   (use (match_operand:SI 3 "register_operand" "l"))
    (return)]
   "TARGET_32BIT
    && DEFAULT_ABI == ABI_AIX
   [(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s"))
         (match_operand 1 "" "g"))
    (use (match_operand:SI 2 "immediate_operand" "O"))
-   (use (match_scratch:SI 3 "=l"))
+   (use (match_operand:SI 3 "register_operand" "l"))
    (return)]
   "TARGET_64BIT 
    && DEFAULT_ABI == ABI_AIX
        (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s"))
              (match_operand 2 "" "g")))
    (use (match_operand:SI 3 "immediate_operand" "O"))
-   (use (match_scratch:SI 4 "=l"))
+   (use (match_operand:SI 4 "register_operand" "l"))
    (return)]
   "TARGET_32BIT
    && DEFAULT_ABI == ABI_AIX
        (call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s"))
              (match_operand 2 "" "g")))
    (use (match_operand:SI 3 "immediate_operand" "O"))
-   (use (match_scratch:SI 4 "=l"))
+   (use (match_operand:SI 4 "register_operand" "l"))
    (return)]
   "TARGET_64BIT 
    && DEFAULT_ABI == ABI_AIX
   [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s,s"))
         (match_operand 1 "" ""))
    (use (match_operand 2 "immediate_operand" "O,n"))
-   (use (match_scratch:SI 3 "=l,l"))
+   (use (match_operand:SI 3 "register_operand" "l,l"))
    (return)]
   "(DEFAULT_ABI == ABI_DARWIN
      || DEFAULT_ABI == ABI_V4
                (call (mem:SI (match_operand 1 "address_operand" ""))
                      (match_operand 2 "" "")))
              (use (match_operand 3 "" ""))
-             (use (scratch:SI))
+             (use (match_operand 4 "" ""))
              (return)])]
   ""
   "
     abort ();
 
   operands[1] = XEXP (operands[1], 0);
+  operands[4] = gen_reg_rtx (SImode);
 
 }")
 
        (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s,s"))
              (match_operand 2 "" "")))
    (use (match_operand:SI 3 "immediate_operand" "O,n"))
-   (use (match_scratch:SI 4 "=l,l"))
+   (use (match_operand:SI 4 "register_operand" "l,l"))
    (return)]
   "(DEFAULT_ABI == ABI_DARWIN
        || DEFAULT_ABI == ABI_V4
index 5e719ae..ab950fd 100644 (file)
@@ -237,7 +237,11 @@ const_double_htab_hash (x)
   if (GET_MODE (value) == VOIDmode)
     h = CONST_DOUBLE_LOW (value) ^ CONST_DOUBLE_HIGH (value);
   else
-    h = real_hash (CONST_DOUBLE_REAL_VALUE (value));
+    {
+      h = real_hash (CONST_DOUBLE_REAL_VALUE (value)); 
+      /* MODE is used in the comparison, so it should be in the hash.  */
+      h ^= GET_MODE (value);
+    }
   return h;
 }
 
index 50c1692..b366b54 100644 (file)
@@ -1108,10 +1108,12 @@ scan_loop (loop, flags)
   /* Now consider each movable insn to decide whether it is worth moving.
      Store 0 in regs->array[I].set_in_loop for each reg I that is moved.
 
-     Generally this increases code size, so do not move moveables when
-     optimizing for code size.  */
+     For machines with few registers this increases code size, so do not
+     move moveables when optimizing for code size on such machines.  
+     (The 18 below is the value for i386.)  */
 
-  if (! optimize_size)
+  if (!optimize_size 
+      || (reg_class_size[GENERAL_REGS] > 18 && !loop_info->has_call))
     {
       move_movables (loop, movables, threshold, insn_count);