Skip to content

Commit 2438ad3

Browse files
AndyAyersMSCopilot
andcommitted
Clarify wasm prolog zero-init comment
Address PR review feedback: drop the confusing reference to `register-init bookkeeping below`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1f9b88e commit 2438ad3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/coreclr/jit/codegencommon.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5113,9 +5113,8 @@ void CodeGen::genFnProlog()
51135113
regMaskTP initDblRegs = RBM_NONE;
51145114

51155115
#ifdef TARGET_WASM
5116-
// On WASM, only memory-resident lvMustInit locals contribute to the prolog
5117-
// zero-init range. Wasm-local-resident scalars are auto-zeroed by the wasm
5118-
// runtime, and the register-init bookkeeping below has no analogue on wasm.
5116+
// For Wasm we only need to zero locals on the shadow stack; wasm locals are
5117+
// automatically zeroed.
51195118
for (unsigned varNum = 0; varNum < m_compiler->lvaCount; ++varNum)
51205119
{
51215120
LclVarDsc* varDsc = m_compiler->lvaGetDesc(varNum);

0 commit comments

Comments
 (0)