diff options
author | Bernd Schmidt <bernd.schmidt@analog.com> | 2007-02-27 15:26:19 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2007-02-27 15:26:19 +0000 |
commit | 97130915859e571fc8eb6e4ff0eab2ad5e737cc9 (patch) | |
tree | 7427a5da41cb12cd69d71ea309b18c83cd5cdf69 /gcc/config | |
parent | 6ce986b9719b516a800d538e039f9fdf6411d649 (diff) | |
download | gcc-97130915859e571fc8eb6e4ff0eab2ad5e737cc9.zip gcc-97130915859e571fc8eb6e4ff0eab2ad5e737cc9.tar.gz gcc-97130915859e571fc8eb6e4ff0eab2ad5e737cc9.tar.bz2 |
bfin.md (rotl16, [...]): New patterns.
* config/bfin/bfin.md (rotl16, rotlsi3, rotrsi3): New patterns.
From-SVN: r122377
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/bfin/bfin.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/config/bfin/bfin.md b/gcc/config/bfin/bfin.md index 6786902..b65e8dd 100644 --- a/gcc/config/bfin/bfin.md +++ b/gcc/config/bfin/bfin.md @@ -1477,6 +1477,37 @@ %0 = %1 >>> %2%!" [(set_attr "type" "shft,dsp32")]) +(define_insn "rotl16" + [(set (match_operand:SI 0 "register_operand" "=d") + (rotate:SI (match_operand:SI 1 "register_operand" "d") + (const_int 16)))] + "" + "%0 = PACK (%h1, %d1)%!" + [(set_attr "type" "dsp32")]) + +(define_expand "rotlsi3" + [(set (match_operand:SI 0 "register_operand" "") + (rotate:SI (match_operand:SI 1 "register_operand" "") + (match_operand:SI 2 "immediate_operand" "")))] + "" +{ + if (INTVAL (operands[2]) != 16) + FAIL; +}) + +(define_expand "rotrsi3" + [(set (match_operand:SI 0 "register_operand" "") + (rotatert:SI (match_operand:SI 1 "register_operand" "") + (match_operand:SI 2 "immediate_operand" "")))] + "" +{ + if (INTVAL (operands[2]) != 16) + FAIL; + emit_insn (gen_rotl16 (operands[0], operands[1])); + DONE; +}) + + (define_insn "ror_one" [(set (match_operand:SI 0 "register_operand" "=d") (ior:SI (lshiftrt:SI (match_operand:SI 1 "register_operand" "d") (const_int 1)) |