diff options
Diffstat (limited to 'gcc/config/h8300/h8300.md')
-rw-r--r-- | gcc/config/h8300/h8300.md | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 7e49af5ef75..016a524d29e 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -414,7 +414,7 @@ if (which_alternative == 7) return \"clrmac\;ldmac %1,macl\"; if (which_alternative == 8) - return \"stmac macl,%0\"; + return \"stmac macl,%0\"; if (GET_CODE (operands[1]) == CONST_INT) { int val = INTVAL (operands[1]); @@ -861,7 +861,7 @@ (sign_extend:SI (mem:HI (post_inc:SI (match_operand:SI 2 "register_operand" "r"))))))] "TARGET_H8300S" - "clrmac\;mac %2,%1" + "clrmac\;mac @%2+,@%1+" [(set_attr "length" "6") (set_attr "cc" "none_0hit")]) @@ -874,7 +874,7 @@ (post_inc:SI (match_operand:SI 2 "register_operand" "r"))))) (match_operand:SI 3 "register_operand" "0")))] "TARGET_H8300S" - "mac %2,%1" + "mac @%2+,@%1+" [(set_attr "length" "4") (set_attr "cc" "none_0hit")]) @@ -1674,7 +1674,7 @@ (define_expand "zero_extendhisi2" [(set (match_operand:SI 0 "register_operand" "") - (zero_extend:SI (match_operand:HI 1 "general_operand" "")))] + (zero_extend:SI (match_operand:HI 1 "register_operand" "")))] "" " { @@ -1709,18 +1709,16 @@ (set_attr "cc" "clobber,clobber,clobber")]) (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (zero_extend:SI (match_operand:HI 1 "general_operand_src" "0,g>")))] + [(set (match_operand:SI 0 "register_operand" "=r") + (zero_extend:SI (match_operand:HI 1 "register_operand" "0")))] "TARGET_H8300H || TARGET_H8300S" - "@ - extu.l %S0 - mov.w %T1,%T0\;extu.l %S0" - [(set_attr "length" "2,4") - (set_attr "cc" "set_znv,set_znv")]) + "extu.l %S0" + [(set_attr "length" "2") + (set_attr "cc" "set_znv")]) (define_expand "extendqihi2" [(set (match_operand:HI 0 "register_operand" "") - (sign_extend:HI (match_operand:QI 1 "general_operand" "")))] + (sign_extend:HI (match_operand:QI 1 "register_operand" "")))] "" "") @@ -1735,14 +1733,12 @@ (set_attr "cc" "clobber,clobber")]) (define_insn "" - [(set (match_operand:HI 0 "register_operand" "=r,r") - (sign_extend:HI (match_operand:QI 1 "general_operand_src" "0,g>")))] + [(set (match_operand:HI 0 "register_operand" "=r") + (sign_extend:HI (match_operand:QI 1 "register_operand" "0")))] "TARGET_H8300H || TARGET_H8300S" - "@ - exts.w %T0 - mov.b %R1,%s0\;exts.w %T0" - [(set_attr "length" "2,4") - (set_attr "cc" "set_znv,set_znv")]) + "exts.w %T0" + [(set_attr "length" "2") + (set_attr "cc" "set_znv")]) ;; The compiler can synthesize a 300H variant of this which is ;; just as efficient as one that we'd create @@ -1758,7 +1754,7 @@ (define_expand "extendhisi2" [(set (match_operand:SI 0 "register_operand" "") - (sign_extend:SI (match_operand:HI 1 "general_operand" "")))] + (sign_extend:SI (match_operand:HI 1 "register_operand" "")))] "" " { @@ -1791,14 +1787,12 @@ (set_attr "cc" "clobber,clobber")]) (define_insn "" - [(set (match_operand:SI 0 "register_operand" "=r,r") - (sign_extend:SI (match_operand:HI 1 "general_operand_src" "0,g>")))] + [(set (match_operand:SI 0 "register_operand" "=r") + (sign_extend:SI (match_operand:HI 1 "register_operand" "0")))] "TARGET_H8300H || TARGET_H8300S" - "@ - exts.l %S0 - mov.w %T1,%T0\;exts.l %S0" - [(set_attr "length" "2,4") - (set_attr "cc" "set_znv,set_znv")]) + "exts.l %S0" + [(set_attr "length" "2") + (set_attr "cc" "set_znv")]) ;; ---------------------------------------------------------------------- ;; SHIFTS @@ -2292,7 +2286,7 @@ (define_peephole [(set (match_operand:HI 1 "register_operand" "") - (plus:HI (match_dup 1) (const_int -1))) + (plus:HI (match_dup 1) (const_int -2))) (set (mem:HI (match_dup 1)) (match_operand:HI 0 "register_operand" ""))] "REGNO(operands[1]) != REGNO(operands[0])" |