Skip to content

[Wasm RyuJit] Wasm abi classifier#123515

Merged
jkotas merged 35 commits intodotnet:mainfrom
AndyAyersMS:WasmABIClassifier
Feb 14, 2026
Merged

[Wasm RyuJit] Wasm abi classifier#123515
jkotas merged 35 commits intodotnet:mainfrom
AndyAyersMS:WasmABIClassifier

Conversation

@AndyAyersMS
Copy link
Member

Add host (vm, crossgen) logic to classify structs per the Wasm Basic C ABI.

Add calls in the JIT when targeting Wasm; also add extra calls under SPMI when not targeting Wasm, so we can continue to use cross-jitting to help test Wasm bring-up.

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 22, 2026
@AndyAyersMS
Copy link
Member Author

FYI @dotnet/jit-contrib

The Wasm C ABI spec is here: https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md.

Clang's implementation: https://github.com/llvm/llvm-project/blob/711e8e56943c0188b037f3a9a42905d071949c90/clang/lib/CodeGen/Targets/WebAssembly.cpp#L99

Not yet, or not properly, handling:

  • empty structs
  • unions
  • C++ structs with dtors/cctors
  • over-aligned structs
  • structs with native layout
  • larger than necessary structs with a native int / pointer field
  • simd field

@am11 am11 added the arch-wasm WebAssembly architecture label Jan 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.

@AndyAyersMS AndyAyersMS marked this pull request as ready for review February 11, 2026 01:21
Copilot AI review requested due to automatic review settings February 11, 2026 01:21
@AndyAyersMS
Copy link
Member Author

@dotnet/jit-contrib PTAL, should be getting close.

I should probably also implement the return buffer logic here.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 11, 2026 01:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.

Copy link
Contributor

@SingleAccretion SingleAccretion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo comments.

@jkotas jkotas merged commit be15f85 into dotnet:main Feb 14, 2026
107 of 115 checks passed
@jkotas
Copy link
Member

jkotas commented Feb 14, 2026

Merged with admin override to workaround github bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants