Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1780,9 +1780,14 @@ void CallArgs::AddFinalArgsAndDetermineABIInfo(Compiler* comp, GenTreeCall* call
// Push the stub address onto the list of arguments.
NewCallArg indirCellAddrArg =
NewCallArg::Primitive(indirectCellAddress).WellKnown(WellKnownArg::R2RIndirectionCell);
#ifdef TARGET_WASM
// On wasm we need to ensure we put the indirection cell address last in LIR, after the SP and formal args.
PushBack(comp, indirCellAddrArg);
#else
InsertAfterThisOrFirst(comp, indirCellAddrArg);
#endif // TARGET_WASM
}
#endif
#endif // defined(FEATURE_READYTORUN)

#if defined(TARGET_WASM)
// On WASM, we need to add an initial argument for the stack pointer for managed calls.
Expand Down
Loading