Skip to content

Commit 86e6aa8

Browse files
bors[bot]ptersilie
andauthored
64: Make new stackmaps in the form LLVM expects. r=ltratt a=ptersilie Co-authored-by: Lukas Diekmann <lukas.diekmann@gmail.com>
2 parents e3a83eb + ac763c1 commit 86e6aa8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/CodeGen/Yk/FixStackmapsSpillReloads.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,12 @@ bool FixStackmapsSpillReloads::runOnMachineFunction(MachineFunction &MF) {
190190
}
191191
MOI++;
192192
}
193+
MachineOperand *Last = NewMI->operands_end() - 1;
194+
if (!Last->isReg() || !Last->isImplicit()) {
195+
// Unless the last operand is an implicit register, the last operand
196+
// needs to be `NextLive` due to the way stackmaps are parsed.
197+
MIB.addImm(StackMaps::NextLive);
198+
}
193199
// Insert the new stackmap instruction just after the last call.
194200
MI.getParent()->insertAfter(LastCall, NewMI);
195201
// Remember the old stackmap instruction for deletion later.

0 commit comments

Comments
 (0)