8233232: AArch64: Shenandoah: jni_fast_GetLongField is broken
authoraph
Fri, 01 Nov 2019 06:04:35 -0400
changeset 58916 7298f7c503b4
parent 58868 f547a06da806
child 58917 33f9271b3167
8233232: AArch64: Shenandoah: jni_fast_GetLongField is broken Reviewed-by: shade, rkennke
src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp
--- a/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp	Thu Oct 31 10:37:03 2019 +0100
+++ b/src/hotspot/cpu/aarch64/gc/shenandoah/shenandoahBarrierSetAssembler_aarch64.cpp	Fri Nov 01 06:04:35 2019 -0400
@@ -443,8 +443,9 @@
   __ cbz(obj, done);
 
   assert(obj != rscratch2, "need rscratch2");
-  Address gc_state(rthread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
-  __ ldrb(rscratch2, gc_state);
+  Address gc_state(jni_env, ShenandoahThreadLocalData::gc_state_offset() - JavaThread::jni_environment_offset());
+  __ lea(rscratch2, gc_state);
+  __ ldrb(rscratch2, Address(rscratch2));
 
   // Check for heap in evacuation phase
   __ tbnz(rscratch2, ShenandoahHeap::EVACUATION_BITPOS, slowpath);