-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[wasm][coreclr] Remove [Get|Set]InterpExecMethodSP #121200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasm][coreclr] Remove [Get|Set]InterpExecMethodSP #121200
Conversation
As they are not used on wasm. Let `GetCurrentSP` return C runtime stack pointer. Also fix few asserts.
|
Tagging subscribers to this area: @mangod9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Co-authored-by: Aaron R Robinson <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
The comment was not valid anymore
|
Gcc build breaks: |
|
/ba-g the failed job is timeout |
As they are not used on wasm.
Let
GetCurrentSPreturn C runtime stack pointer.Also fix few asserts.