summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86MCInstLower.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-12-19 12:01:51 -0800
committerPhilip Reames <listmail@philipreames.com>2019-12-19 12:38:44 -0800
commitcf6aafa47c3771e4f353bfbdeb8157347b305339 (patch)
tree5ee4bbf5da7b3543b6e023826bdddd5537af03ae /llvm/lib/Target/X86/X86MCInstLower.cpp
parent7fcd9e3f70830a9c4bf631a602c2764180b5c3a8 (diff)
downloadbcm5719-llvm-cf6aafa47c3771e4f353bfbdeb8157347b305339.tar.gz
bcm5719-llvm-cf6aafa47c3771e4f353bfbdeb8157347b305339.zip
[FaultMaps] Make label formation a bit more explicit [NFC]
This is in advance of assembler padding directives support where we'll need to bundle the label w/the corresponding faulting instruction to avoid padding being inserted between.
Diffstat (limited to 'llvm/lib/Target/X86/X86MCInstLower.cpp')
-rw-r--r--llvm/lib/Target/X86/X86MCInstLower.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86MCInstLower.cpp b/llvm/lib/Target/X86/X86MCInstLower.cpp
index e869aa64a1e..4876df50766 100644
--- a/llvm/lib/Target/X86/X86MCInstLower.cpp
+++ b/llvm/lib/Target/X86/X86MCInstLower.cpp
@@ -1209,8 +1209,12 @@ void X86AsmPrinter::LowerFAULTING_OP(const MachineInstr &FaultingMI,
unsigned Opcode = FaultingMI.getOperand(3).getImm();
unsigned OperandsBeginIdx = 4;
+ auto &Ctx = OutStreamer->getContext();
+ MCSymbol *FaultingLabel = Ctx.createTempSymbol();
+ OutStreamer->EmitLabel(FaultingLabel);
+
assert(FK < FaultMaps::FaultKindMax && "Invalid Faulting Kind!");
- FM.recordFaultingOp(FK, HandlerLabel);
+ FM.recordFaultingOp(FK, FaultingLabel, HandlerLabel);
MCInst MI;
MI.setOpcode(Opcode);
OpenPOWER on IntegriCloud