]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ms1.md (decrement_and_branch_until_zero): Add early clobber to scratch reg.
authorNathan Sidwell <nathan@codesourcery.com>
Wed, 30 Nov 2005 16:29:43 +0000 (16:29 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Wed, 30 Nov 2005 16:29:43 +0000 (16:29 +0000)
* 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.

From-SVN: r107720

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

index 813e2098d4e215ca633ae19161ea1460fe49bcc3..4b9e14549651a345803feb2cf858947bd0880767 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 aa01831ade4f4fc9f3ea11fcf100a8eaffaeba5a..68f6eac7dd0fa2a7cbc6f295d63f84571d95ca98 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 1d5ff5266f362e500c0c14b58d265d3b3b2e7ebf..50e704c7bb68ed6143f49e01d7694ae0117ff375 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 44baad37ef2e284645b57a266e9c297302ddccd6..eba1eeabeebde57777cb8f4483843dfd864a0a60 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.