case 'P': // Don't print @PLT, but do print as memory.
printOperand(MI, OpNo, "mem", /*NotRIPRel=*/true);
return false;
+
+ case 'n': { // Negate the immediate or print a '-' before the operand.
+ // Note: this is a temporary solution. It should be handled target
+ // independently as part of the 'MC' work.
+ const MachineOperand &MO = MI->getOperand(OpNo);
+ if (MO.isImm()) {
+ O << -MO.getImm();
+ return false;
+ }
+ O << '-';
+ }
}
}
--- /dev/null
+; RUN: llvm-as < %s | llc -march=x86 | grep { 37}
+; rdar://7008959
+
+define void @bork() nounwind {
+entry:
+ tail call void asm sideeffect "BORK ${0:n}", "i,~{dirflag},~{fpsr},~{flags}"(i32 -37) nounwind
+ ret void
+}