LLVM  15.0.0git
Namespaces | Functions
MCWin64EH.cpp File Reference
#include "llvm/MC/MCWin64EH.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/Twine.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/Win64EH.h"
Include dependency graph for MCWin64EH.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

static uint8_t CountOfUnwindCodes (std::vector< WinEH::Instruction > &Insns)
 
static void EmitAbsDifference (MCStreamer &Streamer, const MCSymbol *LHS, const MCSymbol *RHS)
 
static void EmitUnwindCode (MCStreamer &streamer, const MCSymbol *begin, WinEH::Instruction &inst)
 
static void EmitSymbolRefWithOfs (MCStreamer &streamer, const MCSymbol *Base, const MCSymbol *Other)
 
static void EmitRuntimeFunction (MCStreamer &streamer, const WinEH::FrameInfo *info)
 
static void EmitUnwindInfo (MCStreamer &streamer, WinEH::FrameInfo *info)
 
static const MCExprGetSubDivExpr (MCStreamer &Streamer, const MCSymbol *LHS, const MCSymbol *RHS, int Div)
 
static Optional< int64_t > GetOptionalAbsDifference (MCStreamer &Streamer, const MCSymbol *LHS, const MCSymbol *RHS)
 
static int64_t GetAbsDifference (MCStreamer &Streamer, const MCSymbol *LHS, const MCSymbol *RHS)
 
static uint32_t ARM64CountOfUnwindCodes (ArrayRef< WinEH::Instruction > Insns)
 
static void ARM64EmitUnwindCode (MCStreamer &streamer, const WinEH::Instruction &inst)
 
static MCSymbolFindMatchingEpilog (const std::vector< WinEH::Instruction > &EpilogInstrs, const std::vector< MCSymbol * > &Epilogs, const WinEH::FrameInfo *info)
 
static void simplifyARM64Opcodes (std::vector< WinEH::Instruction > &Instructions, bool Reverse)
 
static int getARM64OffsetInProlog (const std::vector< WinEH::Instruction > &Prolog, const std::vector< WinEH::Instruction > &Epilog)
 
static int checkARM64PackedEpilog (MCStreamer &streamer, WinEH::FrameInfo *info, int PrologCodeBytes)
 
static bool tryARM64PackedUnwind (WinEH::FrameInfo *info, uint32_t FuncLength, int PackedEpilogOffset)
 
static void ARM64EmitUnwindInfo (MCStreamer &streamer, WinEH::FrameInfo *info, bool TryPacked=true)
 
static uint32_t ARMCountOfUnwindCodes (ArrayRef< WinEH::Instruction > Insns)
 
static uint32_t ARMCountOfInstructionBytes (ArrayRef< WinEH::Instruction > Insns, bool *HasCustom=nullptr)
 
static void checkARMInstructions (MCStreamer &Streamer, ArrayRef< WinEH::Instruction > Insns, const MCSymbol *Begin, const MCSymbol *End, StringRef Name, StringRef Type)
 
static bool isARMTerminator (const WinEH::Instruction &inst)
 
static void ARMEmitUnwindCode (MCStreamer &streamer, const WinEH::Instruction &inst)
 
static int getARMOffsetInProlog (const std::vector< WinEH::Instruction > &Prolog, const std::vector< WinEH::Instruction > &Epilog, bool CanTweakProlog)
 
static int checkARMPackedEpilog (MCStreamer &streamer, WinEH::FrameInfo *info, int PrologCodeBytes)
 
static bool parseRegMask (unsigned Mask, bool &HasLR, bool &HasR11, unsigned &Folded, int &IntRegs)
 
static bool tryARMPackedUnwind (MCStreamer &streamer, WinEH::FrameInfo *info, uint32_t FuncLength)
 
static void ARMEmitUnwindInfo (MCStreamer &streamer, WinEH::FrameInfo *info, bool TryPacked=true)
 
static void ARMEmitRuntimeFunction (MCStreamer &streamer, const WinEH::FrameInfo *info)
 

Function Documentation

◆ ARM64CountOfUnwindCodes()

static uint32_t ARM64CountOfUnwindCodes ( ArrayRef< WinEH::Instruction Insns)
static

◆ ARM64EmitUnwindCode()

static void ARM64EmitUnwindCode ( MCStreamer streamer,
const WinEH::Instruction inst 
)
static

◆ ARM64EmitUnwindInfo()

static void ARM64EmitUnwindInfo ( MCStreamer streamer,
WinEH::FrameInfo info,
bool  TryPacked = true 
)
static

◆ ARMCountOfInstructionBytes()

static uint32_t ARMCountOfInstructionBytes ( ArrayRef< WinEH::Instruction Insns,
bool *  HasCustom = nullptr 
)
static

◆ ARMCountOfUnwindCodes()

static uint32_t ARMCountOfUnwindCodes ( ArrayRef< WinEH::Instruction Insns)
static

◆ ARMEmitRuntimeFunction()

static void ARMEmitRuntimeFunction ( MCStreamer streamer,
const WinEH::FrameInfo info 
)
static

◆ ARMEmitUnwindCode()

static void ARMEmitUnwindCode ( MCStreamer streamer,
const WinEH::Instruction inst 
)
static

◆ ARMEmitUnwindInfo()

static void ARMEmitUnwindInfo ( MCStreamer streamer,
WinEH::FrameInfo info,
bool  TryPacked = true 
)
static

◆ checkARM64PackedEpilog()

static int checkARM64PackedEpilog ( MCStreamer streamer,
WinEH::FrameInfo info,
int  PrologCodeBytes 
)
static

◆ checkARMInstructions()

static void checkARMInstructions ( MCStreamer Streamer,
ArrayRef< WinEH::Instruction Insns,
const MCSymbol Begin,
const MCSymbol End,
StringRef  Name,
StringRef  Type 
)
static

Definition at line 1259 of file MCWin64EH.cpp.

Referenced by ARMEmitUnwindInfo().

◆ checkARMPackedEpilog()

static int checkARMPackedEpilog ( MCStreamer streamer,
WinEH::FrameInfo info,
int  PrologCodeBytes 
)
static

◆ CountOfUnwindCodes()

static uint8_t CountOfUnwindCodes ( std::vector< WinEH::Instruction > &  Insns)
static

◆ EmitAbsDifference()

static void EmitAbsDifference ( MCStreamer Streamer,
const MCSymbol LHS,
const MCSymbol RHS 
)
static

◆ EmitRuntimeFunction()

static void EmitRuntimeFunction ( MCStreamer streamer,
const WinEH::FrameInfo info 
)
static

◆ EmitSymbolRefWithOfs()

static void EmitSymbolRefWithOfs ( MCStreamer streamer,
const MCSymbol Base,
const MCSymbol Other 
)
static

◆ EmitUnwindCode()

static void EmitUnwindCode ( MCStreamer streamer,
const MCSymbol begin,
WinEH::Instruction inst 
)
static

◆ EmitUnwindInfo()

static void EmitUnwindInfo ( MCStreamer streamer,
WinEH::FrameInfo info 
)
static

◆ FindMatchingEpilog()

static MCSymbol* FindMatchingEpilog ( const std::vector< WinEH::Instruction > &  EpilogInstrs,
const std::vector< MCSymbol * > &  Epilogs,
const WinEH::FrameInfo info 
)
static

Definition at line 543 of file MCWin64EH.cpp.

References assert(), i, info, and llvm::Match.

Referenced by ARM64EmitUnwindInfo(), and ARMEmitUnwindInfo().

◆ GetAbsDifference()

static int64_t GetAbsDifference ( MCStreamer Streamer,
const MCSymbol LHS,
const MCSymbol RHS 
)
static

◆ getARM64OffsetInProlog()

static int getARM64OffsetInProlog ( const std::vector< WinEH::Instruction > &  Prolog,
const std::vector< WinEH::Instruction > &  Epilog 
)
static

Definition at line 632 of file MCWin64EH.cpp.

References ARM64CountOfUnwindCodes(), Epilog, I, and Prolog.

Referenced by ARM64EmitUnwindInfo(), and checkARM64PackedEpilog().

◆ getARMOffsetInProlog()

static int getARMOffsetInProlog ( const std::vector< WinEH::Instruction > &  Prolog,
const std::vector< WinEH::Instruction > &  Epilog,
bool  CanTweakProlog 
)
static

◆ GetOptionalAbsDifference()

static Optional<int64_t> GetOptionalAbsDifference ( MCStreamer Streamer,
const MCSymbol LHS,
const MCSymbol RHS 
)
static

◆ GetSubDivExpr()

static const MCExpr* GetSubDivExpr ( MCStreamer Streamer,
const MCSymbol LHS,
const MCSymbol RHS,
int  Div 
)
static

◆ isARMTerminator()

static bool isARMTerminator ( const WinEH::Instruction inst)
static

◆ parseRegMask()

static bool parseRegMask ( unsigned  Mask,
bool &  HasLR,
bool &  HasR11,
unsigned &  Folded,
int IntRegs 
)
static

Definition at line 1526 of file MCWin64EH.cpp.

References First, IntRegs, llvm::BitmaskEnumDetail::Mask(), and N.

Referenced by tryARMPackedUnwind().

◆ simplifyARM64Opcodes()

static void simplifyARM64Opcodes ( std::vector< WinEH::Instruction > &  Instructions,
bool  Reverse 
)
static

◆ tryARM64PackedUnwind()

static bool tryARM64PackedUnwind ( WinEH::FrameInfo info,
uint32_t  FuncLength,
int  PackedEpilogOffset 
)
static

Definition at line 693 of file MCWin64EH.cpp.

References info, and llvm::Win64EH::UOP_SetFP.

Referenced by ARM64EmitUnwindInfo().

◆ tryARMPackedUnwind()

static bool tryARMPackedUnwind ( MCStreamer streamer,
WinEH::FrameInfo info,
uint32_t  FuncLength 
)
static