EmitFPOData =
Subtarget->isTargetWin32() && MF.getMMI().getModule()->getCodeViewFlag();
+ IndCSPrefix =
+ MF.getMMI().getModule()->getModuleFlag("indirect_branch_cs_prefix");
+
SetupMachineFunction(MF);
if (Subtarget->isTargetCOFF()) {
EmitFPOData = false;
+ IndCSPrefix = false;
+
// We didn't modify anything.
return false;
}
std::unique_ptr<MCCodeEmitter> CodeEmitter;
bool EmitFPOData = false;
bool ShouldEmitWeakSwiftAsyncExtendedFramePointerFlags = false;
+ bool IndCSPrefix = false;
// This utility class tracks the length of a stackmap instruction's 'shadow'.
// It is used by the X86AsmPrinter to ensure that the stackmap shadow
if (OutStreamer->isVerboseAsm())
addConstantComments(MI, *OutStreamer);
- bool IndCS =
- MF->getMMI().getModule()->getModuleFlag("indirect_branch_cs_prefix");
-
switch (MI->getOpcode()) {
case TargetOpcode::DBG_VALUE:
llvm_unreachable("Should be handled target independently");
}
case X86::TAILJMPd64:
- if (IndCS && MI->hasRegisterImplicitUseOperand(X86::R11))
+ if (IndCSPrefix && MI->hasRegisterImplicitUseOperand(X86::R11))
EmitAndCountInstruction(MCInstBuilder(X86::CS_PREFIX));
LLVM_FALLTHROUGH;
case X86::TAILJMPr:
.addReg(X86::NoRegister));
return;
case X86::CALL64pcrel32:
- if (IndCS && MI->hasRegisterImplicitUseOperand(X86::R11))
+ if (IndCSPrefix && MI->hasRegisterImplicitUseOperand(X86::R11))
EmitAndCountInstruction(MCInstBuilder(X86::CS_PREFIX));
break;
}