[wasm][coreclr] Remove [Get|Set]InterpExecMethodSP#121200
Merged
radekdoulik merged 12 commits intodotnet:mainfrom Nov 4, 2025
Merged
[wasm][coreclr] Remove [Get|Set]InterpExecMethodSP#121200radekdoulik merged 12 commits intodotnet:mainfrom
radekdoulik merged 12 commits intodotnet:mainfrom
Conversation
As they are not used on wasm. Let `GetCurrentSP` return C runtime stack pointer. Also fix few asserts.
Contributor
|
Tagging subscribers to this area: @mangod9 |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds WebAssembly (WASM) support to the CoreCLR interpreter by implementing stack pointer functionality and conditionally excluding WASM-incompatible code. The changes enable proper interpreter execution on WASM platforms.
Key changes:
- Implements
GetCurrentSP()for WASM using Emscripten's stack API - Conditionally disables
SetInterpExecMethodSP()and related stack pointer storage on WASM - Replaces incorrect
_ASSERTEusage withPORTABILITY_ASSERTin unimplemented WASM functions - Excludes floating-point register update functions from WASM compilation
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/wasm/cgencpu.h | Implements GetCurrentSP() using emscripten_stack_get_current() and adds Emscripten stack header include; replaces assertion macros |
| src/coreclr/vm/wasm/excepcpu.h | Replaces _ASSERTE with PORTABILITY_ASSERT for unimplemented function |
| src/coreclr/debug/inc/wasm/primitives.h | Replaces _ASSERTE with PORTABILITY_ASSERT for unimplemented function |
| src/coreclr/vm/interpexec.cpp | Guards four SetInterpExecMethodSP() calls with #ifndef TARGET_WASM to disable on WASM |
| src/coreclr/vm/frames.h | Conditionally excludes SetInterpExecMethodSP(), GetInterpExecMethodSP(), and m_SP member from WASM builds |
| src/coreclr/vm/frames.cpp | Conditionally excludes floating-point register update functions from WASM builds |
jkotas
reviewed
Oct 30, 2025
jkotas
reviewed
Oct 30, 2025
This was referenced Oct 30, 2025
Open
jkotas
reviewed
Oct 31, 2025
jkotas
reviewed
Oct 31, 2025
jkotas
reviewed
Oct 31, 2025
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
The comment was not valid anymore
radekdoulik
commented
Nov 3, 2025
jkotas
approved these changes
Nov 3, 2025
Member
|
Gcc build breaks: |
Member
Author
|
/ba-g the failed job is timeout |
This was referenced Nov 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As they are not used on wasm.
Let
GetCurrentSPreturn C runtime stack pointer.Also fix few asserts.