Skip to content

Commit 5cf094a

Browse files
committed
Fix build break in x86
1 parent 8020a5a commit 5cf094a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

lib/Backend/Lower.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29144,7 +29144,15 @@ void Lowerer::LowerGeneratorHelper::InsertNullOutGeneratorFrameInEpilogue(IR::La
2914429144
this->func->SetArgOffset(symSrc, LowererMD::GetFormalParamOffset() * MachPtr);
2914529145
IR::SymOpnd* srcOpnd = IR::SymOpnd::New(symSrc, TyMachPtr, this->func);
2914629146
IR::RegOpnd* dstOpnd = IR::RegOpnd::New(TyMachReg, this->func);
29147-
dstOpnd->SetReg(RegRSI); // callee-save register
29147+
29148+
// callee-save register, we would replace this register in the epilogue anyway
29149+
// so use it as a temp register
29150+
#if defined(_M_X64)
29151+
dstOpnd->SetReg(RegRSI);
29152+
#elif defined(_M_IX86)
29153+
dstOpnd->SetReg(RegESI);
29154+
#endif
29155+
2914829156
InsertMove(dstOpnd, srcOpnd, insertionPoint);
2914929157

2915029158
IR::IndirOpnd* indirOpnd = IR::IndirOpnd::New(dstOpnd, Js::JavascriptGenerator::GetFrameOffset(), TyMachPtr, this->func);

0 commit comments

Comments
 (0)