RFR: Primitive access for interpreter/x86

Roman Kennke rkennke at redhat.com
Wed May 2 12:12:57 UTC 2018


This implements the primitive Access API in x86 template interpreter.
Several things to note:

- This will be upstreamed ASAP, but I wanted to give it some little time
to spin in Shenandoah land. See JDK-8200623
- It does not change the access API. We can use load_at() and store_at()
as is
- float, double and long access cannot pass Register for src (store) or
dst (load), because:
  - float/double would take XMMRegister instead of Register, which is
not API compatible
  - float/double in some cases load to floating point stack, which does
not use any explicit register
  - long does use *two* registers (rax/rdx) in 32bit land

... however, all of them use fixed registers (rax/rdx for long, xmm0 for
float/double or float stack). I made the API such that for those cases
we expect noreg, and assume ltos/ftos/dtos.

- Shenandoah employs the correct barriers by peeking at addr.base()
- Some array accesses use flattened addresses, which does not work for
Shenandoah. I fixed them to use obj+offset addressing (which seems more
efficient too, because no extra instructions/math required). See JDK-8202016

- 32bit long access requires to jump through some extra hoops for atomic
access. I'm passing the extra decorator MO_RELAXED to decide that.

- AArch64 will follow separately. Not sure what to do about other
arches? Would be nice to get them all in sync.


http://cr.openjdk.java.net/~rkennke/interp_primitives/webrev.00/

Passes: hotspot_gc_shenandoah

Roman



More information about the shenandoah-dev mailing list