diff options
author | Steve Chamberlain <sac@gnu.org> | 1994-12-07 01:52:01 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@gnu.org> | 1994-12-07 01:52:01 +0000 |
commit | 3e8bd1ce2b32d1bd01f5f0556a1f0e9ecd4d0bfc (patch) | |
tree | afcbf6f7bfb38d3c2ddc9499948a7dcd7502a915 /gcc | |
parent | 732149f9d5d8a5b6d760f17399134de2c17e84ad (diff) | |
download | gcc-3e8bd1ce2b32d1bd01f5f0556a1f0e9ecd4d0bfc.zip gcc-3e8bd1ce2b32d1bd01f5f0556a1f0e9ecd4d0bfc.tar.gz gcc-3e8bd1ce2b32d1bd01f5f0556a1f0e9ecd4d0bfc.tar.bz2 |
*** empty log message ***
From-SVN: r8620
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/sh/sh.md | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index f009d8c..d514746 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -616,7 +616,6 @@ ;; shift left - (define_insn "ashlsi3_k" [(set (match_operand:SI 0 "arith_reg_operand" "=r,r") (ashift:SI (match_operand:SI 1 "arith_reg_operand" "0,0") @@ -681,21 +680,33 @@ (define_insn "ashrsi2_16" [(set (match_operand:SI 0 "register_operand" "=r") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "0") - (const_int 16))) - (clobber (reg:SI 18))] + (ashiftrt:SI (match_operand:SI 1 "register_operand" "r") + (const_int 16)))] "" - "shlr16 %0\;exts.w %0,%0" + "swap.w %1,%0\;exts.w %0,%0" [(set_attr "length" "4")]) - (define_insn "ashrsi2_31" - [(set (match_operand:SI 0 "register_operand" "=r") - (ashiftrt:SI (match_operand:SI 1 "register_operand" "0") - (const_int 31)))] + [(set (match_operand:SI 0 "register_operand" "=r,r") + (ashiftrt:SI (match_operand:SI 1 "register_operand" "0,!r") + (const_int 31))) + (clobber (reg:SI 18))] "" - "shal %0\;subc %0,%0" - [(set_attr "length" "4")]) + "* +{ + if (which_alternative == 1) + { + if (dead_or_set_p (insn, operands[1])) + return \"shll %1\;subc %0,%0\"; + else + return \"mov %1,%0\;shll %0\;subc %0,%0\"; + } + return \"shll %0\;subc %0,%0\"; +}" + [(set_attr "length" "4,6")]) + + + (define_insn "ashrsi3_n" @@ -1945,3 +1956,4 @@ +
\ No newline at end of file |