Unsafe.{get,put}-X-Unaligned; Efficient array comparison intrinsics

Andrew Haley aph at redhat.com
Wed Feb 25 11:47:53 UTC 2015

On 02/25/2015 11:26 AM, Paul Sandoz wrote:

> I think it simpler just to have one method with a boolean parameter
> whose default false value means native and true means
> BigEndian. Otherwise, even simpler, just support native only (like
> the existing access impls) and let the caller reverse as/when
> required.

There have to be different big- and little-endian versions of the
get/put methods because of the different way that subwords are merged.
See hotspot/src/cpu/ppc/vm/bytes_ppc.hpp, with its two versions of
these methods.  So we're going to need big and little versions for
hardware with no unaligned access.  Any given machine will only use
one set of these methods.


More information about the hotspot-compiler-dev mailing list