Skip to content

Commit a25e58a

Browse files
committed
Use rcx/ecx
1 parent 62dd193 commit a25e58a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/Backend/Lower.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29143,13 +29143,12 @@ void Lowerer::LowerGeneratorHelper::InsertNullOutGeneratorFrameInEpilogue(IR::La
2914329143
IR::SymOpnd* srcOpnd = IR::SymOpnd::New(symSrc, TyMachPtr, this->func);
2914429144
IR::RegOpnd* dstOpnd = IR::RegOpnd::New(TyMachReg, this->func);
2914529145

29146-
// We would replace the values in all of the callee-saved registers
29147-
// in the epilogue anyway, so use one of them to store the address
29148-
// to our interpreter frame
29146+
// Since we are already in the epilogue, use one of the caller-saved
29147+
// registers to store the address to our interpreter frame
2914929148
#if defined(_M_X64)
29150-
dstOpnd->SetReg(RegR15); // R15 is callee-save on both Windows/Linux
29149+
dstOpnd->SetReg(RegRCX);
2915129150
#elif defined(_M_IX86)
29152-
dstOpnd->SetReg(RegESI);
29151+
dstOpnd->SetReg(RegECX);
2915329152
#endif
2915429153

2915529154
InsertMove(dstOpnd, srcOpnd, insertionPoint);

0 commit comments

Comments
 (0)