ms1.md (decrement_and_branch_until_zero): Add early clobber to scratch reg.

* 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
This commit is contained in:
Nathan Sidwell 2005-11-30 16:29:43 +00:00 committed by Nathan Sidwell
parent ec96361103
commit e541c31f4c
4 changed files with 27 additions and 36 deletions

View 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>

View 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"
/* Run-time target specifications. */

View File

@ -88,30 +88,13 @@
(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
@ -148,12 +131,11 @@
[(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
@ -162,10 +144,9 @@
(pc)))
(set (match_dup 0)
(plus:SI (match_dup 0) (const_int -1)))
])
]
""
)
(clobber (reg:SI 0))])]
"")
;; Moves
@ -959,7 +940,7 @@
[(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"

View File

@ -19,10 +19,6 @@
; 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.