Skip to content

[GR-65450] Port ML-KEM stubs#13741

Closed
graalvmbot wants to merge 2 commits into
masterfrom
yz/GR-65450
Closed

[GR-65450] Port ML-KEM stubs#13741
graalvmbot wants to merge 2 commits into
masterfrom
yz/GR-65450

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

Problem

ML-KEM intrinsics currently depend on HotSpot-owned stubs. Graal needs its own lowering and stub linkage so the Kyber operations used by ML-KEM remain intrinsified under Graal JIT and Native Image, with emitted code kept in sync with the HotSpot implementations on AMD64 and AArch64.

Summary

This PR moves ML-KEM stub ownership into Graal while keeping the emitted bodies structurally aligned with the HotSpot stubs.

  • Adds Kyber graph nodes, plugin wiring, foreign-call linkage, and LIR generator support for the ML-KEM stub operations.
  • Ports the AMD64 and AArch64 Kyber stubs for NTT, inverse NTT, NTT multiplication, add-poly, 12-to-16 parsing, and Barrett reduction.
  • Adds the required assembler support and architecture-specific LIR ops for the new stubs.
  • Registers the stubs for Native Image and keeps CPU-feature gating aligned with the HotSpot paths, including ASIMD gating on AArch64.
  • Preserves HotSpot comments and @SyncPort provenance in the ported support code.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 9, 2026
@graalvmbot graalvmbot closed this Jun 10, 2026
@graalvmbot graalvmbot deleted the yz/GR-65450 branch June 10, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants