This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/17731] sub-optimal code generated for left shift


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-29 18:11 -------
on PPC:
__ZN4test5shiftEii:
        rlwinm r5,r5,0,27,31
        slw r3,r4,r5
        blr

Which is correct as r5 could be greater than 31 and being greater than 31 is undefined (4 bits are only 
used really but it could do something different than that).

So if this were to be done correctly, we would need a target hook for the Java front-end.

Note the only reason why I bring this up is because we just had a bootstrap failure where we depended 
on being anded by the machine and not in the code.

-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]