RFR: 8340453: C2: Improve encoding of LoadNKlass for compact headers [v2]

Roman Kennke rkennke at openjdk.org
Fri Nov 15 21:29:11 UTC 2024


On Fri, 15 Nov 2024 21:06:19 GMT, Dean Long <dlong at openjdk.org> wrote:

> > > It looks like this only works for little-endian. Is that documented somewhere?
> > 
> > 
> > I am not sure what you mean. This change is about x86_64 and aarch64, and both are little-endian. The layout of the mark-word is documented in markWord.hpp. Is that what you are looking for?
> 
> Wouldn't klass_offset_in_bytes need to have a different value for big-endian?

I think so, yes. It would be 0, right? Which would not easily work, because offset 0 would conflict with the C2 memory slice for the mark-word. Big endian arches (do we even support any?) would need to use the old fake-offset method like we did before this change.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/22078#issuecomment-2479943053


More information about the hotspot-compiler-dev mailing list