OSDN Git Service

* config/ms1/ms1.md (decrement_and_branch_until_zero): Add early
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Nov 2005 16:29:43 +0000 (16:29 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Nov 2005 16:29:43 +0000 (16:29 +0000)
clobber to scratch reg.
(*decrement_and_branch_until_zero_no_clobber): Remove.
(decrement_and_branch peephole): Add dummy scratch reg to pattern.
(mulhish3): Use TARGET_MS1_16_003, TARGET_MS2.
* config/ms1/ms1.opt (mmul): Remove.
* config/ms1/ms1.h (ASM_SPEC): Cope with uppercase arch names.
(LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Default to 16-002.

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

gcc/ChangeLog
gcc/config/ms1/ms1.h
gcc/config/ms1/ms1.md
gcc/config/ms1/ms1.opt

index 813e209..4b9e145 100644 (file)
@@ -1,3 +1,14 @@
+2005-11-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * config/ms1/ms1.md (decrement_and_branch_until_zero): Add early
+       clobber to scratch reg.
+       (*decrement_and_branch_until_zero_no_clobber): Remove.
+       (decrement_and_branch peephole): Add dummy scratch reg to pattern.
+       (mulhish3): Use TARGET_MS1_16_003, TARGET_MS2.
+       * config/ms1/ms1.opt (mmul): Remove.
+       * config/ms1/ms1.h (ASM_SPEC): Cope with uppercase arch names.
+       (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Default to 16-002.
+
 2005-11-30  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
            Bernd Schmidt  <bernd.schmidt@analog.com>
 
index aa01831..68f6eac 100644 (file)
@@ -41,7 +41,7 @@ extern enum processor_type ms1_cpu;
 /* A C string constant that tells the GCC driver program options to pass to
    the assembler.  */
 #undef  ASM_SPEC
-#define ASM_SPEC "%{march=ms1-16-002: -march=ms1-16-002} %{march=ms1-16-003: -march=ms1-16-003} %{march=ms2: -march=ms2} %{!march=*: -march=ms1-16-002}"
+#define ASM_SPEC "%{march=*} %{!march=*: -march=ms1-16-002}"
 
 /* A string to pass to at the end of the command given to the linker.  */
 #undef  LIB_SPEC
@@ -54,7 +54,8 @@ march=MS1-16-002:-T 16-002.ld%s; \
 march=ms1-16-003:-T 16-003.ld%s; \
 march=MS1-16-003:-T 16-003.ld%s; \
 march=ms2:-T ms2.ld%s; \
-march=MS2:-T ms2.ld%s}"
+march=MS2:-T ms2.ld%s; \
+        : -T 16-002.ld}"
 
 /* A string to pass at the very beginning of the command given to the
    linker.  */
@@ -67,7 +68,8 @@ march=MS1-16-002:%{!mno-crt0:crt0-16-002.o%s} startup-16-002.o%s; \
 march=ms1-16-003:%{!mno-crt0:crt0-16-003.o%s} startup-16-003.o%s; \
 march=MS1-16-003:%{!mno-crt0:crt0-16-003.o%s} startup-16-003.o%s; \
 march=ms2:%{!mno-crt0:crt0-ms2.o%s} startup-ms2.o%s; \
-march=MS2:%{!mno-crt0:crt0-ms2.o%s} startup-ms2.o%s} \
+march=MS2:%{!mno-crt0:crt0-ms2.o%s} startup-ms2.o%s; \
+        :%{!mno-crt0:crt0-16-002.o%s} startup-16-002.o%s} \
 crti.o%s crtbegin.o%s"
 
 /* A string to pass at the end of the command given to the linker.  */
@@ -80,7 +82,8 @@ march=MS1-16-002:exit-16-002.o%s; \
 march=ms1-16-003:exit-16-003.o%s; \
 march=MS1-16-003:exit-16-003.o%s; \
 march=ms2:exit-ms2.o%s; \
-march=MS2:exit-ms2.o%s} \
+march=MS2:exit-ms2.o%s; \
+        :exit-16-002.o%s} \
  crtend.o%s crtn.o%s"
 \f
 /* Run-time target specifications.  */
index 1d5ff52..50e704c 100644 (file)
     (set (match_dup 0)
         (plus:SI (match_dup 0)
                  (const_int -1)))
-    (clobber (match_scratch:SI 2 "=X,r"))]
+    (clobber (match_scratch:SI 2 "=X,&r"))]
   "TARGET_MS1_16_003 || TARGET_MS2"
   "@
    dbnz\t%0, %l1%#
    #"
-  [(set_attr "length" "4,16")]
-)
-
-;; Same as above, but without the clobber. The peephole below will
-;; match this pattern.
-(define_insn "*decrement_and_branch_until_zero_no_clobber"
-   [(set (pc)
-        (if_then_else
-         (ne (match_operand:SI 0 "register_operand" "+r")
-             (const_int 0))
-         (label_ref (match_operand 1 "" ""))
-         (pc)))
-    (set (match_dup 0)
-        (plus:SI (match_dup 0)
-                 (const_int -1)))]
-  "TARGET_MS1_16_003 || TARGET_MS2"
-  "dbnz\t%0, %l1%#"
-  [(set_attr "length" "4")
-   (set_attr "type" "branch")]
+  [(set_attr "length" "4,16")
+   (set_attr "type" "branch,unknown")]
 )
 
 ;; Split the above to handle the case where operand 0 is in memory
   [(set (match_operand:SI 0 "register_operand" "")
        (plus:SI (match_dup 0) (const_int -1)))
    (set (match_operand:SI 1 "register_operand" "")
-       (const_int -1))
+     (const_int -1))
    (set (pc) (if_then_else
                (ne (match_dup 0) (match_dup 1))
                (label_ref (match_operand 2 "" ""))
-               (pc)))
-   ]
+               (pc)))]
   "TARGET_MS1_16_003 || TARGET_MS2"
   [(parallel [(set (pc)
                   (if_then_else
                      (pc)))
               (set (match_dup 0)
                   (plus:SI (match_dup 0) (const_int -1)))
-            ])
-  ]
-  ""
-)
+             (clobber (reg:SI 0))])]
+  "")
+
 \f
 ;; Moves
 
   [(set (match_operand:SI 0 "register_operand" "=r,r")
      (mult:SI (sign_extend:SI (match_operand:HI 1 "register_operand" "%r,r"))
              (sign_extend:SI (match_operand:HI 2 "arith_operand" "r,I"))))]
-  "TARGET_MUL"
+  "TARGET_MS1_16_003 || TARGET_MS2"
   "@
   mul %0, %1, %2
   muli %0, %1, %2"
index 44baad3..eba1eea 100644 (file)
 ; Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 ; 02110-1301, USA.
 
-mmul
-Target Report Mask(MUL)
-Generate multiply instructions
-
 mbacc
 Target Report Mask(BYTE_ACCESS)
 Use byte loads and stores when generating code.