Improving the performance of OpenJDK
Gary Benson
gbenson at redhat.com
Wed Feb 18 03:08:51 PST 2009
Andrew Haley wrote:
> Gary Benson wrote:
> > Edward Nevill wrote:
> > > get_native_u2() and get_Java_u2() ... This seems to be a
> > > misguided attempt of the original authors to optimised reading
> > > of halfwords (judging by the comment immediate preceding the
> > > code).
> >
> > It's not an optimization, it's to do unaligned access on hardware
> > that doesn't support it. I'm guessing ARM does allow unaligned
> > access by the fact that your code didn't segfault instantly ;)
>
> ARM doesn't support unaligned loads. The new ARM code as posted is
>
> ldrsb r0, [java_pc, #0]
> ldrb r1, [java_pc, #1]
> orr r1, r1, r0, lsl #8
>
> i.e two byte loads.
Ah, I didn't realise. Which is good, it means this optimization is
generic :)
Cheers,
Gary
--
http://gbenson.net/
More information about the zero-dev
mailing list