Expr = MCBinaryExpr::CreateSub(Expr,
MCSymbolRefExpr::Create(MF.getPICBaseSymbol(), Ctx),
Ctx);
- if (MO.isJTI() && MAI.hasSetDirective()) {
+ if (MO.isJTI()) {
+ assert(MAI.doesSetDirectiveSuppressesReloc());
// If .set directive is supported, use it to reduce the number of
// relocations the assembler will generate for differences between
// local labels. This is only safe when the symbols are in the same
// a constant shuffle mask. We won't be able to do this at the MC layer
// because the mask isn't an immediate.
case X86::PSHUFBrm:
- case X86::VPSHUFBrm: {
+ case X86::VPSHUFBrm:
+ case X86::VPSHUFBYrm: {
if (!OutStreamer.isVerboseAsm())
break;
assert(MI->getNumOperands() > 5 &&
MCInst TmpInst;
MCInstLowering.Lower(MI, TmpInst);
EmitAndCountInstruction(TmpInst);
+
+ // Stackmap shadows cannot include branch targets, so we can count the bytes
+ // in a call towards the shadow, but must flush the shadow immediately after
+ // to account for the return from the call.
+ if (MI->isCall())
+ SMShadowTracker.emitShadowPadding(OutStreamer, getSubtargetInfo());
}