OSDN Git Service

* config/sparc/sparc.md (movdi_insn_sp32): Add o/J alternative.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Apr 2002 17:24:28 +0000 (17:24 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 11 Apr 2002 17:24:28 +0000 (17:24 +0000)
        (movdi_insn_sp32_v9): Likewise.  Only allow stx with aligned memory.
        (dimode mem/zero splitter): New.

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

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

index f605e1f..e703ffb 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-11  Richard Henderson  <rth@redhat.com>
+
+       * config/sparc/sparc.md (movdi_insn_sp32): Add o/J alternative.
+       (movdi_insn_sp32_v9): Likewise.  Only allow stx with aligned memory.
+       (dimode mem/zero splitter): New.
+
 2002-04-11  Hans-Peter Nilsson  <hp@axis.com>
 
        * config/cris/cris.c (cris_override_options): Tweak error message
index 02699e5..3ce7988 100644 (file)
@@ -1,4 +1,4 @@
-;- Machine description for SPARC chip for GNU C compiler
+;; Machine description for SPARC chip for GNU C compiler
 ;;  Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
 ;;  1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 ;;  Contributed by Michael Tiemann (tiemann@cygnus.com)
 
 (define_insn "*movdi_insn_sp32_v9"
   [(set (match_operand:DI 0 "nonimmediate_operand"
-                                       "=m,T,U,o,r,r,r,?T,?f,?f,?o,?f")
+                                       "=T,o,T,U,o,r,r,r,?T,?f,?f,?o,?f")
         (match_operand:DI 1 "input_operand"
-                                       " J,U,T,r,o,i,r, f, T, o, f, f"))]
+                                       " J,J,U,T,r,o,i,r, f, T, o, f, f"))]
   "! TARGET_ARCH64 && TARGET_V9
    && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
   "@
    stx\\t%%g0, %0
+   #
    std\\t%1, %0
    ldd\\t%1, %0
    #
    #
    #
    #"
-  [(set_attr "type" "store,store,load,*,*,*,*,fpstore,fpload,*,*,*")
-   (set_attr "length" "*,*,*,2,2,2,2,*,*,2,2,2")])
+  [(set_attr "type" "store,store,store,load,*,*,*,*,fpstore,fpload,*,*,*")
+   (set_attr "length" "*,2,*,*,2,2,2,2,*,*,2,2,2")])
 
 (define_insn "*movdi_insn_sp32"
   [(set (match_operand:DI 0 "nonimmediate_operand"
-                               "=T,U,o,r,r,r,?T,?f,?f,?o,?f")
+                               "=o,T,U,o,r,r,r,?T,?f,?f,?o,?f")
         (match_operand:DI 1 "input_operand"
-                               " U,T,r,o,i,r, f, T, o, f, f"))]
+                               " J,U,T,r,o,i,r, f, T, o, f, f"))]
   "! TARGET_ARCH64
    && (register_operand (operands[0], DImode)
        || register_operand (operands[1], DImode))"
   "@
+   #
    std\\t%1, %0
    ldd\\t%1, %0
    #
    #
    #
    #"
-  [(set_attr "type" "store,load,*,*,*,*,fpstore,fpload,*,*,*")
-   (set_attr "length" "*,*,2,2,2,2,*,*,2,2,2")])
+  [(set_attr "type" "store,store,load,*,*,*,*,fpstore,fpload,*,*,*")
+   (set_attr "length" "2,*,*,2,2,2,2,*,*,2,2,2")])
 
 ;; The following are generated by sparc_emit_set_const64
 (define_insn "*movdi_sp64_dbl"
   DONE;
 }")
 
+(define_split
+  [(set (match_operand:DI 0 "memory_operand" "")
+        (const_int 0))]
+  "reload_completed
+   && (! TARGET_V9
+       || (! TARGET_ARCH64
+          && ! mem_min_alignment (operands[0], 8)))
+   && offsettable_memref_p (operands[0])"
+  [(clobber (const_int 0))]
+  "
+{
+  emit_insn (gen_movsi (adjust_address (operands[0], SImode, 0), const0_rtx));
+  emit_insn (gen_movsi (adjust_address (operands[0], SImode, 4), const0_rtx));
+  DONE;
+}")
 \f
 ;; Floating point move insns