26 for (
const auto &
I : Insns) {
27 switch (static_cast<Win64EH::UnwindOpcodes>(
I.Operation)) {
43 Count += (
I.Offset > 512 * 1024 - 8) ? 3 : 2;
64 switch (static_cast<Win64EH::UnwindOpcodes>(inst.
Operation)) {
72 if (inst.
Offset > 512 * 1024 - 8) {
85 b2 |= (((inst.
Offset - 8) >> 3) & 0x0F) << 4;
163 uint8_t flags = 0x01;
192 for (uint8_t c = 0; c < numInst; ++c) {
213 else if (numCodes == 0) {
Instances of this class represent a uniqued identifier for a section in the current translation unit...
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
UNW_TerminateHandler - Specifies that this function has a termination handler.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
ArrayRef< WinEH::FrameInfo * > getWinFrameInfos() const
const_iterator begin(StringRef path)
Get begin iterator over path.
std::vector< Instruction > Instructions
UNW_ChainInfo - Specifies that this UnwindInfo structure is chained to another one.
static void EmitSymbolRefWithOfs(MCStreamer &streamer, const MCSymbol *Base, const MCSymbol *Other)
Base class for the full range of assembler expressions which are needed for parsing.
Represent a reference to a symbol from inside an expression.
MCContext & getContext() const
static void EmitAbsDifference(MCStreamer &Streamer, const MCSymbol *LHS, const MCSymbol *RHS)
Context object for machine code objects.
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static const MCBinaryExpr * createAdd(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
virtual void EmitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers...
Streaming machine code generation interface.
MCSymbol * createTempSymbol(bool CanBeUnnamed=true)
Create and return a new assembler temporary symbol with a unique but unspecified name.
const FrameInfo * ChainedParent
virtual void SwitchSection(MCSection *Section, const MCExpr *Subsection=nullptr)
Set the current section where code is being emitted to Section.
virtual void EmitValueToAlignment(unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI) const override
static void EmitRuntimeFunction(MCStreamer &streamer, const WinEH::FrameInfo *info)
const MCSymbol * PrologEnd
virtual void EmitLabel(MCSymbol *Symbol)
Emit a label for Symbol into the current section.
const MCSymbol * Function
static void EmitUnwindCode(MCStreamer &streamer, const MCSymbol *begin, WinEH::Instruction &inst)
static uint8_t CountOfUnwindCodes(std::vector< WinEH::Instruction > &Insns)
UNW_ExceptionHandler - Specifies that this function has an exception handler.
static MCSection * getPDataSection(const MCSymbol *Function, MCContext &Context)
static MCSection * getXDataSection(const MCSymbol *Function, MCContext &Context)
void EmitValue(const MCExpr *Value, unsigned Size, const SMLoc &Loc=SMLoc())
static void EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info)
const MCSymbol * ExceptionHandler
void Emit(MCStreamer &Streamer) const override