RFR: 8322770: Implement C2 VectorizedHashCode on AArch64 [v20]

Mikhail Ablakatov duke at openjdk.org
Fri Sep 27 17:27:40 UTC 2024


On Fri, 27 Sep 2024 14:49:53 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> I believe that an interface should be explicit and map 1:1 to real instructions when it comes to assembly whereas possible.
>> 
>> Anyway, regardless of my preferences, as far as I can see, currently `Assembler` provides all other signed/unsigned versions of arithmetic instructions separately. Adding a single method like this would make the whole API inconsistent. Therefore, I suggest leaving it as is.
>
> I have no problem at all with what class Assembler provides. However, when the result looks like this, even a "normal" assembler programmer would suggest macros rather than copy-and-paste:
> 
> 
>      assert(is_subword_type(eltype), "subword type expected");
>       if (is_signed_subword_type(eltype)) {
>         __ saddwv(vmul3, vmul3, Assembler::T4S, vdata3, Assembler::T4H);
>         __ saddwv(vmul2, vmul2, Assembler::T4S, vdata2, Assembler::T4H);
>         __ saddwv(vmul1, vmul1, Assembler::T4S, vdata1, Assembler::T4H);
>         __ saddwv(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T4H);
>       } else {
>         __ uaddwv(vmul3, vmul3, Assembler::T4S, vdata3, Assembler::T4H);
>         __ uaddwv(vmul2, vmul2, Assembler::T4S, vdata2, Assembler::T4H);
>         __ uaddwv(vmul1, vmul1, Assembler::T4S, vdata1, Assembler::T4H);
>         __ uaddwv(vmul0, vmul0, Assembler::T4S, vdata0, Assembler::T4H);
>       }

Would it be possible to integrate this as is? The code was approved twice before, even though it had the same constructs.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18487#discussion_r1778936507


More information about the hotspot-dev mailing list