[Bug target/40129] M16C invalid shift count used by pack_d -> ashldi3

2009-05-19 Thread eightdot at hotmail dot com


--- Comment #5 from eightdot at hotmail dot com  2009-05-19 11:23 ---
i agree but could find in which release they are first included..
but already fixed in what i now use (4.3.3)...


-- 

eightdot at hotmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40129



[Bug target/40129] M16C invalid shift count used by pack_d -> ashldi3

2009-05-18 Thread dj at redhat dot com


--- Comment #4 from dj at redhat dot com  2009-05-18 19:16 ---
Yes, those two changes are the fix you need.  However, those fixes were over
three years ago, so I consider this bug "already fixed".  If you agree, please
close this bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40129



[Bug target/40129] M16C invalid shift count used by pack_d -> ashldi3

2009-05-18 Thread eightdot at hotmail dot com


--- Comment #3 from eightdot at hotmail dot com  2009-05-18 07:15 ---
input:
int  main(int argc)
{
long a=0x12345678;
long b;
b=a>>argc;
return (b);
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40129



[Bug target/40129] M16C invalid shift count used by pack_d -> ashldi3

2009-05-18 Thread eightdot at hotmail dot com


--- Comment #2 from eightdot at hotmail dot com  2009-05-18 07:13 ---
mm it apreas to be fixed somewhere between 4.1.1 and 4.4.2 
(revision 109661 and 109987 seams to be good candidates afaik in viewcvs but i
cant find which release this is corresponding to..)

input main.c:


output "/usr/libexec/gcc/m32c-unknown-elf/4.1.1/cc1 -mcpu=m16c main.c":
enter   #13
mov.w   r1,-10[fb]
mov.w   #4660,-6[fb]
mov.w   #22136,-8[fb]
mov.w   -10[fb],r0
mov.w   r0,-13[fb]
mov.w   -6[fb],r2
mov.w   -8[fb],r0
mov.b   -13[fb],r1l
neg.b   r1l
mov.b   r1l,-11[fb]
mov.b   -11[fb],r1l
mov.b   r1l,r1h
sha.l   r1h,r2r0
mov.w   r2,-2[fb]
mov.w   r0,-4[fb]
mov.w   -4[fb],r0
exitd



output "/usr/src/cross/m32c/build/gcc-4.4.0/gcc/cc1 -mcpu=m16c main.c"
_main:
enter   #15-2
mov.w   r1,-10[fb]
mov.w   #4660,-6[fb]
mov.w   #22136,-8[fb]
mov.w   -10[fb],r0
mov.w   r0,-13[fb]
mov.w   -6[fb],r2
mov.w   -8[fb],r0
mov.b   -13[fb],r1l
neg.b   r1l
mov.b   r1l,-11[fb]
cmp.b   #-16,-11[fb]
jge .L2
sha.l   #-8,r2r0
sha.l   #-8,r2r0
add.b   #16,-11[fb]
.L2:
mov.b   -11[fb],r1h
sha.l   r1h,r2r0
mov.w   r2,-2[fb]
mov.w   r0,-4[fb]
mov.w   -4[fb],r0
exitd

so it works ok for 4.4.0 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40129



[Bug target/40129] M16C invalid shift count used by pack_d -> ashldi3

2009-05-13 Thread dj at redhat dot com


--- Comment #1 from dj at redhat dot com  2009-05-14 02:52 ---
Do you have a test case that shows an actual problem?  Because the m32c port
has special code that tests for shift counts outside -16..16 and pre-shifts the
value to make the shift count fit (see gcc/config/m32c/m32c.c
m32c_prepare_shift()).


-- 

dj at redhat dot com changed:

   What|Removed |Added

 CC||dj at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40129