RFR: 8356159: RISC-V: Add Zabha [v11]

Robbin Ehn rehn at openjdk.org
Tue Jun 3 09:55:01 UTC 2025


On Tue, 3 Jun 2025 08:53:17 GMT, Feilong Jiang <fjiang at openjdk.org> wrote:

>> Robbin Ehn has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 20 additional commits since the last revision:
>> 
>>  - Set ins cost to 2xVOLA for cmpxchg
>>  - Merge branch 'master' into 8356159
>>  - Merge branch 'master' into 8356159
>>  - ins cost fixes, print fixes
>>  - Merge branch 'master' into 8356159
>>  - Reg limits fixed
>>  - Merge branch 'master' into 8356159
>>  - Fixed reg selection
>>  - More indention
>>  - Indention
>>  - ... and 10 more: https://git.openjdk.org/jdk/compare/ab62c13b...b496c299
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 4151:
> 
>> 4149:       zext(prev, prev, 32);
>> 4150:       break;
>> 4151:     case int16:
> 
> The call site of `atomic_cas` is only guaranteed by `UseZacas`. Do we need extra checking for `UseZabha` if the operand size is `int16` or `int8`?

If nothing else the assembler always checks:

  void amo_base(Register Rd, Register Rs1, uint8_t Rs2, Aqrl memory_order = aqrl) {
    assert(width > AMO_WIDTH_HALFWORD || UseZabha, "Must be");
    assert(funct5 != AMO_CAS || UseZacas, "Must be");


I'll have a look!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25252#discussion_r2123319547


More information about the hotspot-dev mailing list