On Sun, 26 Jul 2026 20:28:13 GMT, Shawn Emery <[email protected]> wrote:

> This enhancement provides AArch64 GPR intrinsics for doubleKeccak().  
> Previously, only SIMD (Neon) intrinsics were implemented for doubleKeccak() 
> on AArch64 systems.  Performance gains for ML-KEM and ML-DSA benchmarks 
> improve from 2 to 9% with the GPR intrinsics:
> 
> ML-KEM decapsulation: +2-6% ops/sec
> ML-KEM encapsulation: +3-8% ops/sec
> ML-KEM key generation: +4-6% ops/sec
> 
> ML-DSA signing: +2-4% ops/sec
> ML-DSA verification: +6-9% ops/sec
> ML-DSA key generation: +6-8% ops/sec
> 
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 5134:

> 5132:     if (can_use_r18 && can_use_fp) {
> 5133:       __ str(r18_tls, Address(sp, 96));
> 5134:     }

This needs refactoring. 
Suggestion:

    auto saved_regs = RegSet::range(r19, r28) + state0 + state1;
    if (can_use_r18 && can_use_fp) {
      saved_regs += r18_tls;
    }
    __ push(saved_regs, sp);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32049#discussion_r3802662464

Reply via email to