On Feb 25, 2015, at 12:47 PM, Andrew Haley <a...@redhat.com> wrote: > 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.
Ah, i just looked at the x86 and sparc versions. > 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. > I am a little confused about the bi-endianess of PPC. The supported endianess in bytes_ppc.hpp is defined at compile time via the flag VM_LITTLE_ENDIAN. So is "native" whatever hotspot is compiled to in this case? Paul.