;; This is a difficult instruction to reload since operand 0 must be the
;; frame pointer. See h8300_reg_class_from_letter for an explanation.
-(define_insn "movmd_internal_normal"
- [(set (mem:BLK (match_operand:HI 3 "register_operand" "0,r"))
- (mem:BLK (match_operand:HI 4 "register_operand" "1,1")))
+(define_insn "movmd_internal_<mode>"
+ [(set (mem:BLK (match_operand:P 3 "register_operand" "0,r"))
+ (mem:BLK (match_operand:P 4 "register_operand" "1,1")))
(unspec [(match_operand:HI 5 "register_operand" "2,2")
(match_operand:HI 6 "const_int_operand" "n,n")] UNSPEC_MOVMD)
- (clobber (match_operand:HI 0 "register_operand" "=d,??D"))
- (clobber (match_operand:HI 1 "register_operand" "=f,f"))
+ (clobber (match_operand:P 0 "register_operand" "=d,??D"))
+ (clobber (match_operand:P 1 "register_operand" "=f,f"))
(set (match_operand:HI 2 "register_operand" "=c,c")
(const_int 0))]
- "TARGET_H8300SX && TARGET_NORMAL_MODE"
- "@
- movmd%m6
- #"
- [(set_attr "length" "2,14")
- (set_attr "can_delay" "no")
- (set_attr "cc" "none,clobber")])
-
-(define_insn "movmd_internal"
- [(set (mem:BLK (match_operand:SI 3 "register_operand" "0,r"))
- (mem:BLK (match_operand:SI 4 "register_operand" "1,1")))
- (unspec [(match_operand:HI 5 "register_operand" "2,2")
- (match_operand:HI 6 "const_int_operand" "n,n")] UNSPEC_MOVMD)
- (clobber (match_operand:SI 0 "register_operand" "=d,??D"))
- (clobber (match_operand:SI 1 "register_operand" "=f,f"))
- (set (match_operand:HI 2 "register_operand" "=c,c")
- (const_int 0))]
- "TARGET_H8300SX && !TARGET_NORMAL_MODE"
+ "TARGET_H8300SX"
"@
movmd%m6
#"
(match_operand:BLK 1 "memory_operand" ""))
(unspec [(match_operand:HI 2 "register_operand" "")
(match_operand:HI 3 "const_int_operand" "")] UNSPEC_MOVMD)
- (clobber (match_operand:HI 4 "register_operand" ""))
- (clobber (match_operand:HI 5 "register_operand" ""))
- (set (match_dup 2)
- (const_int 0))]
- "TARGET_H8300SX && TARGET_NORMAL_MODE && reload_completed
- && REGNO (operands[4]) != DESTINATION_REG"
- [(const_int 0)]
- {
- rtx dest;
-
- h8300_swap_into_er6 (XEXP (operands[0], 0));
- dest = replace_equiv_address (operands[0], hard_frame_pointer_rtx);
- emit_insn (gen_movmd (dest, operands[1], operands[2], operands[3]));
- h8300_swap_out_of_er6 (operands[4]);
- DONE;
- })
-
-(define_split
- [(set (match_operand:BLK 0 "memory_operand" "")
- (match_operand:BLK 1 "memory_operand" ""))
- (unspec [(match_operand:HI 2 "register_operand" "")
- (match_operand:HI 3 "const_int_operand" "")] UNSPEC_MOVMD)
- (clobber (match_operand:SI 4 "register_operand" ""))
- (clobber (match_operand:SI 5 "register_operand" ""))
+ (clobber (match_operand:P 4 "register_operand" ""))
+ (clobber (match_operand:P 5 "register_operand" ""))
(set (match_dup 2)
(const_int 0))]
- "TARGET_H8300SX && !TARGET_NORMAL_MODE && reload_completed
+ "TARGET_H8300SX && reload_completed
&& REGNO (operands[4]) != DESTINATION_REG"
[(const_int 0)]
{
;; See comments above memcpy_internal().
-(define_insn "stpcpy_internal_normal"
- [(set (mem:BLK (match_operand:HI 3 "register_operand" "0,r"))
- (unspec:BLK [(mem:BLK (match_operand:HI 4 "register_operand" "1,1"))]
- UNSPEC_STPCPY))
- (clobber (match_operand:HI 0 "register_operand" "=d,??D"))
- (clobber (match_operand:HI 1 "register_operand" "=f,f"))
- (clobber (match_operand:HI 2 "register_operand" "=c,c"))]
- "TARGET_H8300SX && TARGET_NORMAL_MODE"
- "@
- \n1:\tmovsd\t2f\;bra\t1b\n2:
- #"
- [(set_attr "length" "6,18")
- (set_attr "cc" "none,clobber")])
-
-(define_insn "stpcpy_internal"
- [(set (mem:BLK (match_operand:SI 3 "register_operand" "0,r"))
- (unspec:BLK [(mem:BLK (match_operand:SI 4 "register_operand" "1,1"))]
+(define_insn "stpcpy_internal_<mode>"
+ [(set (mem:BLK (match_operand:P 3 "register_operand" "0,r"))
+ (unspec:BLK [(mem:BLK (match_operand:P 4 "register_operand" "1,1"))]
UNSPEC_STPCPY))
- (clobber (match_operand:SI 0 "register_operand" "=d,??D"))
- (clobber (match_operand:SI 1 "register_operand" "=f,f"))
- (clobber (match_operand:SI 2 "register_operand" "=c,c"))]
- "TARGET_H8300SX && !TARGET_NORMAL_MODE"
+ (clobber (match_operand:P 0 "register_operand" "=d,??D"))
+ (clobber (match_operand:P 1 "register_operand" "=f,f"))
+ (clobber (match_operand:P 2 "register_operand" "=c,c"))]
+ "TARGET_H8300SX"
"@
\n1:\tmovsd\t2f\;bra\t1b\n2:
#"
(define_split
[(set (match_operand:BLK 0 "memory_operand" "")
(unspec:BLK [(match_operand:BLK 1 "memory_operand" "")] UNSPEC_STPCPY))
- (clobber (match_operand:HI 2 "register_operand" ""))
- (clobber (match_operand:HI 3 "register_operand" ""))
- (clobber (match_operand:HI 4 "register_operand" ""))]
- "TARGET_H8300SX && TARGET_NORMAL_MODE && reload_completed
- && REGNO (operands[2]) != DESTINATION_REG"
- [(const_int 0)]
- {
- rtx dest;
-
- h8300_swap_into_er6 (XEXP (operands[0], 0));
- dest = replace_equiv_address (operands[0], hard_frame_pointer_rtx);
- emit_insn (gen_movsd (dest, operands[1], operands[4]));
- h8300_swap_out_of_er6 (operands[2]);
- DONE;
- })
-
-(define_split
- [(set (match_operand:BLK 0 "memory_operand" "")
- (unspec:BLK [(match_operand:BLK 1 "memory_operand" "")] UNSPEC_STPCPY))
- (clobber (match_operand:SI 2 "register_operand" ""))
- (clobber (match_operand:SI 3 "register_operand" ""))
- (clobber (match_operand:SI 4 "register_operand" ""))]
- "TARGET_H8300SX && !TARGET_NORMAL_MODE && reload_completed
+ (clobber (match_operand:P 2 "register_operand" ""))
+ (clobber (match_operand:P 3 "register_operand" ""))
+ (clobber (match_operand:P 4 "register_operand" ""))]
+ "TARGET_H8300SX && reload_completed
&& REGNO (operands[2]) != DESTINATION_REG"
[(const_int 0)]
{