RFR: 8345322: RISC-V: Add concurrent gtests for cmpxchg variants [v4]
Robbin Ehn
rehn at openjdk.org
Wed Dec 11 15:55:13 UTC 2024
On Wed, 11 Dec 2024 14:20:31 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> test/hotspot/gtest/riscv/test_assembler_riscv.cpp line 296:
>>
>>> 294: bool zacas = UseZacas;
>>> 295: UseZacas = false;
>>> 296: run_plain_cmpxchg_tests<uint32_t, Assembler::uint32>();
>>
>> Not quite sure if we should cover `uint32` type here. `lr.w` used to implement the CAS operation loads a 32-bit word and sign-extend it.
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22574#discussion_r1880456441
More information about the hotspot-dev
mailing list