RFR: 8356159: RISC-V: Add Zabha [v2]
Robbin Ehn
rehn at openjdk.org
Tue May 20 12:15:54 UTC 2025
On Fri, 16 May 2025 07:03:20 GMT, Fei Yang <fyang 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 four additional commits since the last revision:
>>
>> - Revert back to default relaxed
>> - Merge branch 'master' into 8356159
>> - Fixed ws
>> - Initial draft
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 3842:
>
>> 3840: Register shift, Register mask, Register aligned_addr) {
>> 3841: assert(size == int8 || size == int16, "unsupported operand size");
>> 3842: assert(!(UseZacas && UseZabha), "Use amocas");
>
> Seems more obvious to move this two assertions to the entry of its callers?
> `MacroAssembler::cmpxchg_narrow_value` and `MacroAssembler::weak_cmpxchg_narrow_value`.
The sizing checking one we really need as otherwise this method generates broken code.
Fixed.
> src/hotspot/cpu/riscv/riscv.ad line 5820:
>
>> 5818: ins_encode %{
>> 5819: __ cmpxchg(as_Register($mem$$base), $oldval$$Register, $newval$$Register, Assembler::int8,
>> 5820: /*acquire*/ Assembler::aq, /*release*/ Assembler::rl, $res$$Register);
>
> Indentation.
Looks like the other one below:
ins_encode %{
__ cmpxchg_narrow_value(as_Register($mem$$base), $oldval$$Register, $newval$$Register, Assembler::int16,
/*acquire*/ Assembler::aq, /*release*/ Assembler::rl, $res$$Register,
/*result_as_bool*/ false, $tmp1$$Register, $tmp2$$Register, $tmp3$$Register);
%}
No ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25252#discussion_r2097797113
PR Review Comment: https://git.openjdk.org/jdk/pull/25252#discussion_r2097793856
More information about the hotspot-dev
mailing list