]> gcc.gnu.org Git - gcc.git/commit
re PR target/19293 (avr-gcc crashes when using shifts with negative shift count)
authorMarek Michalkiewicz <marekm@amelek.gda.pl>
Wed, 26 Jan 2005 21:44:25 +0000 (22:44 +0100)
committerMarek Michalkiewicz <marekm@gcc.gnu.org>
Wed, 26 Jan 2005 21:44:25 +0000 (21:44 +0000)
commita3cf59927ae1bfc5668a6eca5df377ce8572e783
tree079662416201ff8fa42edb9cf9edd2f2a0575e3d
parentd487e3c10ad8ed3327106a84c27d97be497b4798
re PR target/19293 (avr-gcc crashes when using shifts with negative shift count)

PR target/19293
PR target/19329
* config/avr/avr.c (notice_update_cc): Only set condition code for
ashrqi3 if shift count > 0.
(out_shift_with_cnt): Handle shift count <= 0 as a no-op.
(ashlqi3_out, ashlhi3_out, ashlsi3_out, ashrqi3_out, ashrhi3_out,
ashrsi3_out, lshrqi3_out, lshrhi3_out, lshrsi3_out): Handle shift
count <= 0 as a no-op, and shift count >= width by copying zero
or sign bit to all bits of the result.
* config/avr/avr.md (all shifts): Add alternatives for zero shift
count, with attribute "length" set to 0 and "cc" set to "none".

From-SVN: r94288
gcc/ChangeLog
gcc/config/avr/avr.c
gcc/config/avr/avr.md
This page took 0.055255 seconds and 5 git commands to generate.