This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/19293] avr-gcc crashes when using shifts with negative shift count
- From: "schlie at comcast dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2005 05:17:11 -0000
- Subject: [Bug target/19293] avr-gcc crashes when using shifts with negative shift count
- References: <20050106160127.19293.bjoern.m.haase@web.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From schlie at comcast dot net 2005-01-19 05:17 -------
Actually wonder if a better solutions would be to and (&) the rhs shift count by
Log2(rhs-mode-size) bit mask, thereby the resulting value will always be within
0 >= shift <= (N-1), resulting effectivly a shift modulo N, which is more similar
to what hardware and would guess most machines actually do, or am I mistaken?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19293