diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp index 8a1474c5bfa..d40f7e2d58b 100644 --- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp +++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp @@ -7047,6 +7047,7 @@ class StubGenerator: public StubCodeGenerator { assert_asm(_masm, (__ ldr(rscratch1, Address(rthread, JavaThread::cont_entry_offset())), __ cmp(sp, rscratch1)), Assembler::EQ, "incorrect sp"); if (return_barrier) { + // TODO fix for InlineTypeReturnedAsFields, see x86 version // preserve possible return value from a method returning to the return barrier __ fmovd(rscratch1, v0); __ stp(rscratch1, r0, Address(__ pre(sp, -2 * wordSize))); @@ -7057,6 +7058,7 @@ class StubGenerator: public StubCodeGenerator { __ mov(rscratch2, r0); // r0 contains the size of the frames to thaw, 0 if overflow or no more frames if (return_barrier) { + // TODO fix for InlineTypeReturnedAsFields, see x86 version // restore return value (no safepoint in the call to thaw, so even an oop return value should be OK) __ ldp(rscratch1, r0, Address(__ post(sp, 2 * wordSize))); __ fmovd(v0, rscratch1); @@ -7077,6 +7079,7 @@ class StubGenerator: public StubCodeGenerator { __ mov(sp, rscratch1); if (return_barrier) { + // TODO fix for InlineTypeReturnedAsFields, see x86 version // save original return value -- again __ fmovd(rscratch1, v0); __ stp(rscratch1, r0, Address(__ pre(sp, -2 * wordSize))); @@ -7089,6 +7092,7 @@ class StubGenerator: public StubCodeGenerator { __ mov(rscratch2, r0); // r0 is the sp of the yielding frame if (return_barrier) { + // TODO fix for InlineTypeReturnedAsFields, see x86 version // restore return value (no safepoint in the call to thaw, so even an oop return value should be OK) __ ldp(rscratch1, r0, Address(__ post(sp, 2 * wordSize))); __ fmovd(v0, rscratch1); diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java index 86169529e4f..28bc02362a3 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/TestVirtualThreads.java @@ -80,6 +80,7 @@ // TODO run with combinations of -XX:-TieredCompilation -XX:+PreserveFramePointer -XX:-UseOnStackReplacement -XX:+DeoptimizeALot -XX:+StressCallingConvention -XX:-InlineTypePassFieldsAsArgs -XX:-InlineTypeReturnedAsFields // TODO add runs with virtual calls to compiled code with scalarized args which use a different entry point // TODO add tests where C1 needs stack repair +// TODO add a stress mode where another thread does some allocations and System.gc() in parallel to trigger GCs while threads are parked import java.lang.reflect.Method;