From b2ba71cad84307d8493518fb97e19f367578dc05 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sun, 28 Sep 2003 19:17:49 +0000 Subject: [PATCH] s390.md ("*adddi3_carry1_cc", [...]): New insns. * config/s390/s390.md ("*adddi3_carry1_cc", "*adddi3_carry1_cconly", "*adddi3_carry2_cc", "*adddi3_carry2_cconly", "*subdi3_borrow_cc", "*subdi3_borrow_cconly"): New insns. ("*addsi3_sub", "*subsi3_sub"): Remove. ("*subdi3_cc", *subdi3_cconly"): Use only if TARGET_64BIT. ("*subsi3_cc"): Fix op_type attribute. From-SVN: r71885 --- gcc/ChangeLog | 9 ++++ gcc/config/s390/s390.md | 113 +++++++++++++++++++++++++++++++++++------------- 2 files changed, 92 insertions(+), 30 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f6b2b9..1d15edc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2003-09-28 Ulrich Weigand + + * config/s390/s390.md ("*adddi3_carry1_cc", "*adddi3_carry1_cconly", + "*adddi3_carry2_cc", "*adddi3_carry2_cconly", "*subdi3_borrow_cc", + "*subdi3_borrow_cconly"): New insns. + ("*addsi3_sub", "*subsi3_sub"): Remove. + ("*subdi3_cc", *subdi3_cconly"): Use only if TARGET_64BIT. + ("*subsi3_cc"): Fix op_type attribute. + 2003-09-28 Richard Henderson * stmt.c (expand_asm_operands): Take a location_t, instead of diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 973217f..fd92e1b 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -3156,6 +3156,56 @@ "aghi\t%0,%h2" [(set_attr "op_type" "RI")]) +(define_insn "*adddi3_carry1_cc" + [(set (reg 33) + (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (match_dup 1))) + (set (match_operand:DI 0 "register_operand" "=d,d") + (plus:DI (match_dup 1) (match_dup 2)))] + "s390_match_ccmode (insn, CCL1mode) && TARGET_64BIT" + "@ + algr\t%0,%2 + alg\t%0,%2" + [(set_attr "op_type" "RRE,RXY")]) + +(define_insn "*adddi3_carry1_cconly" + [(set (reg 33) + (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (match_dup 1))) + (clobber (match_scratch:DI 0 "=d,d"))] + "s390_match_ccmode (insn, CCL1mode) && TARGET_64BIT" + "@ + algr\t%0,%2 + alg\t%0,%2" + [(set_attr "op_type" "RRE,RXY")]) + +(define_insn "*adddi3_carry2_cc" + [(set (reg 33) + (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (match_dup 2))) + (set (match_operand:DI 0 "register_operand" "=d,d") + (plus:DI (match_dup 1) (match_dup 2)))] + "s390_match_ccmode (insn, CCL1mode) && TARGET_64BIT" + "@ + algr\t%0,%2 + alg\t%0,%2" + [(set_attr "op_type" "RRE,RXY")]) + +(define_insn "*adddi3_carry2_cconly" + [(set (reg 33) + (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (match_dup 2))) + (clobber (match_scratch:DI 0 "=d,d"))] + "s390_match_ccmode (insn, CCL1mode) && TARGET_64BIT" + "@ + algr\t%0,%2 + alg\t%0,%2" + [(set_attr "op_type" "RRE,RXY")]) + (define_insn "*adddi3_cc" [(set (reg 33) (compare (plus:DI (match_operand:DI 1 "nonimmediate_operand" "%0,0") @@ -3395,7 +3445,7 @@ (compare (match_operand:SI 1 "nonimmediate_operand" "%0,0,0") (neg:SI (match_operand:SI 2 "general_operand" "d,R,T")))) (clobber (match_scratch:SI 0 "=d,d,d"))] - "s390_match_ccmode(insn, CCLmode)" + "s390_match_ccmode (insn, CCLmode)" "@ alr\t%0,%2 al\t%0,%2 @@ -3413,17 +3463,6 @@ ahy\t%0,%2" [(set_attr "op_type" "RX,RXY")]) -(define_insn "*addsi3_sub" - [(set (match_operand:SI 0 "register_operand" "=d,d") - (plus:SI (match_operand:SI 1 "register_operand" "0,0") - (subreg:SI (match_operand:HI 2 "memory_operand" "R,T") 0))) - (clobber (reg:CC 33))] - "" - "@ - ah\t%0,%2 - ahy\t%0,%2" - [(set_attr "op_type" "RX,RXY")]) - (define_insn "addsi3" [(set (match_operand:SI 0 "register_operand" "=d,d,d,d") (plus:SI (match_operand:SI 1 "nonimmediate_operand" "%0,0,0,0") @@ -3704,6 +3743,31 @@ slgf\t%0,%2" [(set_attr "op_type" "RRE,RXY")]) +(define_insn "*subdi3_borrow_cc" + [(set (reg 33) + (compare (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (match_dup 1))) + (set (match_operand:DI 0 "register_operand" "=d,d") + (minus:DI (match_dup 1) (match_dup 2)))] + "s390_match_ccmode (insn, CCL2mode) && TARGET_64BIT" + "@ + slgr\t%0,%2 + slg\t%0,%2" + [(set_attr "op_type" "RRE,RXY")]) + +(define_insn "*subdi3_borrow_cconly" + [(set (reg 33) + (compare (minus:DI (match_operand:DI 1 "register_operand" "0,0") + (match_operand:DI 2 "general_operand" "d,m")) + (match_dup 1))) + (clobber (match_scratch:DI 0 "=d,d"))] + "s390_match_ccmode (insn, CCL2mode) && TARGET_64BIT" + "@ + slgr\t%0,%2 + slg\t%0,%2" + [(set_attr "op_type" "RRE,RXY")]) + (define_insn "*subdi3_cc" [(set (reg 33) (compare (minus:DI (match_operand:DI 1 "register_operand" "0,0") @@ -3711,7 +3775,7 @@ (const_int 0))) (set (match_operand:DI 0 "register_operand" "=d,d") (minus:DI (match_dup 1) (match_dup 2)))] - "s390_match_ccmode (insn, CCLmode)" + "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" "@ slgr\t%0,%2 slg\t%0,%2" @@ -3723,7 +3787,7 @@ (match_operand:DI 2 "general_operand" "d,m")) (const_int 0))) (clobber (match_scratch:DI 0 "=d,d"))] - "s390_match_ccmode (insn, CCLmode)" + "s390_match_ccmode (insn, CCLmode) && TARGET_64BIT" "@ slgr\t%0,%2 slg\t%0,%2" @@ -3793,7 +3857,7 @@ (match_dup 1))) (set (match_operand:SI 0 "register_operand" "=d,d,d") (minus:SI (match_dup 1) (match_dup 2)))] - "s390_match_ccmode(insn, CCL2mode)" + "s390_match_ccmode (insn, CCL2mode)" "@ slr\t%0,%2 sl\t%0,%2 @@ -3806,12 +3870,12 @@ (match_operand:SI 2 "general_operand" "d,R,T")) (match_dup 1))) (clobber (match_scratch:SI 0 "=d,d,d"))] - "s390_match_ccmode(insn, CCL2mode)" + "s390_match_ccmode (insn, CCL2mode)" "@ slr\t%0,%2 sl\t%0,%2 sly\t%0,%2" - [(set_attr "op_type" "RR,RX,RXE")]) + [(set_attr "op_type" "RR,RX,RXY")]) (define_insn "*subsi3_cc" [(set (reg 33) @@ -3820,7 +3884,7 @@ (const_int 0))) (set (match_operand:SI 0 "register_operand" "=d,d,d") (minus:SI (match_dup 1) (match_dup 2)))] - "s390_match_ccmode(insn, CCLmode)" + "s390_match_ccmode (insn, CCLmode)" "@ slr\t%0,%2 sl\t%0,%2 @@ -3833,7 +3897,7 @@ (match_operand:SI 2 "general_operand" "d,R,T")) (const_int 0))) (clobber (match_scratch:SI 0 "=d,d,d"))] - "s390_match_ccmode(insn, CCLmode)" + "s390_match_ccmode (insn, CCLmode)" "@ slr\t%0,%2 sl\t%0,%2 @@ -3851,17 +3915,6 @@ shy\t%0,%2" [(set_attr "op_type" "RX,RXY")]) -(define_insn "*subsi3_sub" - [(set (match_operand:SI 0 "register_operand" "=d,d") - (minus:SI (match_operand:SI 1 "register_operand" "0,0") - (subreg:SI (match_operand:HI 2 "memory_operand" "R,T") 0))) - (clobber (reg:CC 33))] - "" - "@ - sh\t%0,%2 - shy\t%0,%2" - [(set_attr "op_type" "RX,RXY")]) - (define_insn "subsi3" [(set (match_operand:SI 0 "register_operand" "=d,d,d") (minus:SI (match_operand:SI 1 "register_operand" "0,0,0") -- 2.7.4