&& !s_operand (operands[1], VOIDmode)"
[(set (match_dup 2) (match_dup 3))
(set (match_dup 0) (mem:TI (match_dup 2)))]
- "operands[2] = operand_subword (operands[0], 0, 0, TImode);
+ "operands[2] = operand_subword (operands[0], 1, 0, TImode);
operands[3] = XEXP (operands[1], 0);")
;
; Move a block that is more than 256 bytes in lenght or length in register
(define_insn "movstrdix_64"
- [(clobber (match_operand:DI 0 "register_operand" "=a"))
- (clobber (match_operand:DI 1 "register_operand" "=a"))
- (set (mem:BLK (match_operand:DI 2 "register_operand" "0"))
- (mem:BLK (match_operand:DI 3 "register_operand" "1")))
- (use (match_operand:DI 4 "register_operand" "a"))
+ [(use (match_operand:DI 4 "register_operand" "a"))
+ (set (match_operand:DI 0 "register_operand" "=a")
+ (plus:DI (match_operand:DI 2 "register_operand" "0")
+ (and:DI (match_dup 4) (const_int -256))))
+ (set (match_operand:DI 1 "register_operand" "=a")
+ (plus:DI (match_operand:DI 3 "register_operand" "1")
+ (and:DI (match_dup 4) (const_int -256))))
+ (set (mem:BLK (match_dup 2))
+ (mem:BLK (match_dup 3)))
(clobber (match_scratch:DI 5 "=&a"))
(clobber (reg:CC 33))]
""
(set_attr "length" "44")])
(define_insn "movstrsix_31"
- [(clobber (match_operand:SI 0 "register_operand" "=a"))
- (clobber (match_operand:SI 1 "register_operand" "=a"))
- (set (mem:BLK (match_operand:SI 2 "register_operand" "0"))
- (mem:BLK (match_operand:SI 3 "register_operand" "1")))
- (use (match_operand:SI 4 "register_operand" "a"))
+ [(use (match_operand:SI 4 "register_operand" "a"))
+ (set (match_operand:SI 0 "register_operand" "=a")
+ (plus:SI (match_operand:SI 2 "register_operand" "0")
+ (and:SI (match_dup 4) (const_int -256))))
+ (set (match_operand:SI 1 "register_operand" "=a")
+ (plus:SI (match_operand:SI 3 "register_operand" "1")
+ (and:SI (match_dup 4) (const_int -256))))
+ (set (mem:BLK (match_dup 2))
+ (mem:BLK (match_dup 3)))
(clobber (match_scratch:SI 5 "=&a"))
(clobber (reg:CC 33))]
""
; Move a block that is larger than 255 bytes in length.
(define_insn "movstrdi_64"
- [(clobber (match_operand:TI 0 "register_operand" "=d"))
- (clobber (match_operand:TI 1 "register_operand" "=d"))
- (set (mem:BLK (subreg:DI (match_operand:TI 2 "register_operand" "0") 0))
- (mem:BLK (subreg:DI (match_operand:TI 3 "register_operand" "1") 0)))
+ [(set (match_operand:TI 0 "register_operand" "=d")
+ (ashift:TI (plus:TI (match_operand:TI 2 "register_operand" "0")
+ (lshiftrt:TI (match_dup 2) (const_int 64)))
+ (const_int 64)))
+ (set (match_operand:TI 1 "register_operand" "=d")
+ (ashift:TI (plus:TI (match_operand:TI 3 "register_operand" "1")
+ (lshiftrt:TI (match_dup 3) (const_int 64)))
+ (const_int 64)))
+ (set (mem:BLK (subreg:DI (match_dup 2) 0))
+ (mem:BLK (subreg:DI (match_dup 3) 0)))
(clobber (reg:CC 33))]
- ""
+ "TARGET_64BIT"
"mvcle\\t%0,%1,0\;jo\\t.-4"
[(set_attr "op_type" "NN")
(set_attr "atype" "mem")
(set_attr "length" "8")])
(define_insn "movstrsi_31"
- [(clobber (match_operand:DI 0 "register_operand" "=d"))
- (clobber (match_operand:DI 1 "register_operand" "=d"))
- (set (mem:BLK (subreg:SI (match_operand:DI 2 "register_operand" "0") 0))
- (mem:BLK (subreg:SI (match_operand:DI 3 "register_operand" "1") 0)))
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (ashift:DI (plus:DI (match_operand:DI 2 "register_operand" "0")
+ (lshiftrt:DI (match_dup 2) (const_int 32)))
+ (const_int 32)))
+ (set (match_operand:DI 1 "register_operand" "=d")
+ (ashift:DI (plus:DI (match_operand:DI 3 "register_operand" "1")
+ (lshiftrt:DI (match_dup 3) (const_int 32)))
+ (const_int 32)))
+ (set (mem:BLK (subreg:SI (match_dup 2) 0))
+ (mem:BLK (subreg:SI (match_dup 3) 0)))
(clobber (reg:CC 33))]
- ""
+ "!TARGET_64BIT"
"mvcle\\t%0,%1,0\;jo\\t.-4"
[(set_attr "op_type" "NN")
(set_attr "atype" "mem")
emit_move_insn (gen_lowpart (DImode, reg1), const0_rtx);
/* Clear! */
- emit_insn (gen_clrstrsi_64 (reg0, reg1, reg0, reg1));
+ emit_insn (gen_clrstrsi_64 (reg0, reg1, reg0));
DONE;
}
}")
emit_move_insn (gen_lowpart (SImode, reg1), const0_rtx);
/* CLear! */
- emit_insn (gen_clrstrsi_31 (reg0, reg1, reg0, reg1));
+ emit_insn (gen_clrstrsi_31 (reg0, reg1, reg0));
DONE;
}
}")
; Clear memory with length greater 256 bytes or lenght not constant
(define_insn "clrstrsi_64"
- [(clobber (match_operand:TI 0 "register_operand" "=d"))
- (clobber (match_operand:TI 1 "register_operand" "=d"))
- (set (mem:BLK (subreg:DI (match_operand:TI 2 "register_operand" "0") 0))
+ [(set (match_operand:TI 0 "register_operand" "=d")
+ (ashift:TI (plus:TI (match_operand:TI 2 "register_operand" "0")
+ (lshiftrt:TI (match_dup 2) (const_int 64)))
+ (const_int 64)))
+ (set (mem:BLK (subreg:DI (match_dup 2) 0))
(const_int 0))
- (use (match_operand:TI 3 "register_operand" "1"))
+ (use (match_operand:TI 1 "register_operand" "d"))
(clobber (reg:CC 33))]
"TARGET_64BIT"
"mvcle\\t%0,%1,0\;jo\\t.-4"
(set_attr "length" "8")])
(define_insn "clrstrsi_31"
- [(clobber (match_operand:DI 0 "register_operand" "=d"))
- (clobber (match_operand:DI 1 "register_operand" "=d"))
- (set (mem:BLK (subreg:SI (match_operand:DI 2 "register_operand" "0") 0))
+ [(set (match_operand:DI 0 "register_operand" "=d")
+ (ashift:DI (plus:DI (match_operand:DI 2 "register_operand" "0")
+ (lshiftrt:DI (match_dup 2) (const_int 32)))
+ (const_int 32)))
+ (set (mem:BLK (subreg:SI (match_dup 2) 0))
(const_int 0))
- (use (match_operand:DI 3 "register_operand" "1"))
+ (use (match_operand:DI 1 "register_operand" "d"))
(clobber (reg:CC 33))]
"!TARGET_64BIT"
"mvcle\\t%0,%1,0\;jo\\t.-4"
{
if (!TARGET_64BIT)
{
- rtx insns, subword;
-
- operands[1] = force_reg (SImode, operands[1]);
- subword = operand_subword (operands[0], 0, 1, DImode);
-
- start_sequence ();
- emit_move_insn (subword, operands[1]);
- emit_insn (gen_ashrdi3 (operands[0], operands[0], GEN_INT (32)));
- insns = get_insns ();
- end_sequence ();
-
- emit_no_conflict_block (insns, operands[0], operands[1], 0,
- gen_rtx_SIGN_EXTEND (DImode, operands[1]));
-
- /* Avoid having the REG_RETVAL destroyed by someone attaching
- other REG_EQUAL notes. */
- emit_move_insn (operands[0], operands[0]);
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+ emit_move_insn (gen_highpart (SImode, operands[0]), operands[1]);
+ emit_move_insn (gen_lowpart (SImode, operands[0]), const0_rtx);
+ emit_insn (gen_ashrdi3 (operands[0], operands[0], GEN_INT (32)));
DONE;
}
}
{
if (!TARGET_64BIT)
{
- rtx insns, subword;
-
- operands[1] = force_reg (SImode, operands[1]);
- subword = operand_subword (operands[0], 0, 1, DImode);
-
- start_sequence ();
- emit_move_insn (subword, operands[1]);
- emit_insn (gen_lshrdi3 (operands[0], operands[0], GEN_INT (32)));
- insns = get_insns ();
- end_sequence ();
-
- emit_no_conflict_block (insns, operands[0], operands[1], 0,
- gen_rtx_ZERO_EXTEND (DImode, operands[1]));
-
- /* Avoid having the REG_RETVAL destroyed by someone attaching
- other REG_EQUAL notes. */
- emit_move_insn (operands[0], operands[0]);
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, operands[0]));
+ emit_move_insn (gen_lowpart (SImode, operands[0]), operands[1]);
+ emit_move_insn (gen_highpart (SImode, operands[0]), const0_rtx);
DONE;
}
}