]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Try to correct misalignment bug with -mcpu=ultrasparc
authorBernd Schmidt <bernds@redhat.com>
Tue, 22 May 2001 15:55:22 +0000 (15:55 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Tue, 22 May 2001 15:55:22 +0000 (15:55 +0000)
From-SVN: r42451

gcc/ChangeLog
gcc/config/sparc/sparc.md

index b47f55d7a480ce05a0cdff032855efe487e59d08..627b33f757e9ea3d479824af4db774e34a1c011a 100644 (file)
@@ -1,3 +1,9 @@
+2001-05-22  Bernd Schmidt  <bernds@redhat.com>
+
+       * sparc.md (movsf, movdf): Allow constant to integer reg moves.
+       (movsf, movdf splitters): Always split if there's an alignment
+       problem.
+
 2001-05-22  David Edelsohn  <dje@watson.ibm.com>
 
        * rs6000.md (movsfcc,movdfcc): Remove NE case.
index 0438614ee4cd3ae9e4fb17abb51169a73586b5f7..315a35a9381d4d0cfbbcea1dc57e85a1c29984a4 100644 (file)
          crashes in output_constant_pool.  */
       if (operands [1] == const0_rtx)
         operands[1] = CONST0_RTX (SFmode);
+      /* We are able to build any SF constant in integer registers
+        with at most 2 instructions.  */
+      if (REGNO (operands[0]) < 32)
+       goto movsf_is_ok;
+
       operands[1] = validize_mem (force_const_mem (GET_MODE (operands[0]),
                                                    operands[1]));
     }
          crashes in output_constant_pool.  */
       if (operands [1] == const0_rtx)
         operands[1] = CONST0_RTX (DFmode);
+      if (REGNO (operands[0]) < 32)
+       goto movdf_is_ok;
+
       operands[1] = validize_mem (force_const_mem (GET_MODE (operands[0]),
                                                    operands[1]));
     }
 (define_split
   [(set (match_operand:DF 0 "register_operand" "")
        (match_operand:DF 1 "memory_operand" ""))]
-  "((! TARGET_V9
-     || (! TARGET_ARCH64
-         && ((GET_CODE (operands[0]) == REG
-              && REGNO (operands[0]) < 32)
-             || (GET_CODE (operands[0]) == SUBREG
-                 && GET_CODE (SUBREG_REG (operands[0])) == REG
-                 && REGNO (SUBREG_REG (operands[0])) < 32))))
-    && (reload_completed
-        && (((REGNO (operands[0])) % 2) != 0
-             || ! mem_min_alignment (operands[1], 8))
-        && offsettable_memref_p (operands[1])))"
+  "reload_completed
+   && ! TARGET_ARCH64
+   && (((REGNO (operands[0]) % 2) != 0)
+       || ! mem_min_alignment (operands[1], 8))
+   && offsettable_memref_p (operands[1])"
   [(clobber (const_int 0))]
   "
 {
 (define_split
   [(set (match_operand:DF 0 "memory_operand" "")
        (match_operand:DF 1 "register_operand" ""))]
-  "((! TARGET_V9
-     || (! TARGET_ARCH64
-         && ((GET_CODE (operands[1]) == REG
-              && REGNO (operands[1]) < 32)
-             || (GET_CODE (operands[1]) == SUBREG
-                 && GET_CODE (SUBREG_REG (operands[1])) == REG
-                 && REGNO (SUBREG_REG (operands[1])) < 32))))
-    && (reload_completed
-        && (((REGNO (operands[1])) % 2) != 0
-             || ! mem_min_alignment (operands[0], 8))
-        && offsettable_memref_p (operands[0])))"
+  "reload_completed
+   && ! TARGET_ARCH64
+   && (((REGNO (operands[1]) % 2) != 0)
+       || ! mem_min_alignment (operands[0], 8))
+   && offsettable_memref_p (operands[0])"
   [(clobber (const_int 0))]
   "
 {