RFR: 8345322: RISC-V: Add concurrent gtests for cmpxchg variants [v4]

Fei Yang fyang at openjdk.org
Thu Dec 12 02:11:37 UTC 2024


On Wed, 11 Dec 2024 15:52:38 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

>> As passing uint32 as operand size is supported and done by compareAndSwapNNode.
>> So we should test it ?
>> 
>> Which also says we should add test with max and min size of TESTSIZE, fixing that.
>
> So one case is shenandoah CAS:ing a narrow oop.
> Narrow oop are zero extended (MASM::set_narrow_oop) which means expected, exchange values should be zero extended. Hence I think we have yet another cmpxchg bug.

Sorry, I withdraw my previous comment. I think we are fine here.
I double checked and found that the the zero-extension is there in `MacroAssembler::load_reserved` for `uint32` type [1].

[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/macroAssembler_riscv.cpp#L3693

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22574#discussion_r1881265779


More information about the hotspot-dev mailing list