LLVM  10.0.0
Namespaces | Enumerations | Functions
X86AsmBackend.cpp File Reference
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86FixupKinds.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCELFObjectWriter.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixupKindInfo.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCMachObjectWriter.h"
#include "llvm/MC/MCObjectStreamer.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for X86AsmBackend.cpp:

Go to the source code of this file.

Namespaces

 CU
 

Enumerations

enum  CompactUnwindEncodings
 Compact unwind encoding values. More...
 

Functions

static unsigned getRelaxedOpcodeBranch (const MCInst &Inst, bool is16BitMode)
 
static unsigned getRelaxedOpcodeArith (const MCInst &Inst)
 
static unsigned getRelaxedOpcode (const MCInst &Inst, bool is16BitMode)
 
static X86::CondCode getCondFromBranch (const MCInst &MI, const MCInstrInfo &MCII)
 
static X86::SecondMacroFusionInstKind classifySecondInstInMacroFusion (const MCInst &MI, const MCInstrInfo &MCII)
 
static bool isRIPRelative (const MCInst &MI, const MCInstrInfo &MCII)
 Check if the instruction uses RIP relative addressing. More...
 
static bool isFirstMacroFusibleInst (const MCInst &Inst, const MCInstrInfo &MCII)
 Check if the instruction is valid as the first instruction in macro fusion. More...
 
static bool hasVariantSymbol (const MCInst &MI)
 Check if the instruction has a variant symbol operand. More...
 
static bool canReuseBoundaryAlignFragment (const MCBoundaryAlignFragment &F)
 
static unsigned getFixupKindSize (unsigned Kind)
 

Enumeration Type Documentation

◆ CompactUnwindEncodings

Compact unwind encoding values.

Definition at line 784 of file X86AsmBackend.cpp.

Function Documentation

◆ canReuseBoundaryAlignFragment()

static bool canReuseBoundaryAlignFragment ( const MCBoundaryAlignFragment &  F)
static

◆ classifySecondInstInMacroFusion()

static X86::SecondMacroFusionInstKind classifySecondInstInMacroFusion ( const MCInst &  MI,
const MCInstrInfo &  MCII 
)
static

◆ getCondFromBranch()

static X86::CondCode getCondFromBranch ( const MCInst &  MI,
const MCInstrInfo &  MCII 
)
static

◆ getFixupKindSize()

static unsigned getFixupKindSize ( unsigned  Kind)
static

Definition at line 520 of file X86AsmBackend.cpp.

References llvm::HexStyle::Asm, assert(), llvm::StringSwitch< T, R >::Case(), llvm::createX86ELFObjectWriter(), llvm::createX86WinCOFFObjectWriter(), llvm::Data, llvm::StringSwitch< T, R >::Default(), DF, llvm::MCInst::dump_pretty(), llvm::ELF::EM_386, llvm::ELF::EM_IAMCU, llvm::ELF::EM_X86_64, llvm::FK_Data_1, llvm::FK_Data_2, llvm::FK_Data_4, llvm::FK_Data_8, llvm::FK_NONE, llvm::FK_PCRel_1, llvm::FK_PCRel_2, llvm::FK_PCRel_4, llvm::FK_PCRel_8, llvm::FK_SecRel_1, llvm::FK_SecRel_2, llvm::FK_SecRel_4, llvm::FK_SecRel_8, llvm::MCFixupKindInfo::FKF_IsPCRel, llvm::MCAssembler::getContext(), llvm::MCSubtargetInfo::getFeatureBits(), llvm::MCAsmBackend::getFixupKind(), llvm::MCFixup::getKind(), llvm::MCFixup::getLoc(), llvm::MCInst::getNumOperands(), llvm::MCFixup::getOffset(), llvm::MCInst::getOpcode(), llvm::MCInst::getOperand(), getRelaxedOpcode(), getRelaxedOpcodeArith(), getRelaxedOpcodeBranch(), is64Bit(), llvm::MCValue::isAbsolute(), llvm::MCOperand::isExpr(), llvm::isInt< 8 >(), llvm::isIntN(), llvm_unreachable, Name, llvm::X86::reloc_branch_4byte_pcrel, llvm::X86::reloc_global_offset_table, llvm::X86::reloc_global_offset_table8, llvm::X86::reloc_riprel_4byte, llvm::X86::reloc_riprel_4byte_movq_load, llvm::X86::reloc_riprel_4byte_relax, llvm::X86::reloc_riprel_4byte_relax_rex, llvm::X86::reloc_signed_4byte, llvm::X86::reloc_signed_4byte_relax, llvm::report_fatal_error(), llvm::MCContext::reportError(), llvm::MCInst::setOpcode(), Size, llvm::ArrayRef< T >::size(), llvm::raw_svector_ostream::str(), and llvm::raw_ostream::write().

◆ getRelaxedOpcode()

static unsigned getRelaxedOpcode ( const MCInst &  Inst,
bool  is16BitMode 
)
static

◆ getRelaxedOpcodeArith()

static unsigned getRelaxedOpcodeArith ( const MCInst &  Inst)
static

Definition at line 193 of file X86AsmBackend.cpp.

References llvm::MCInst::getOpcode().

Referenced by getFixupKindSize(), and getRelaxedOpcode().

◆ getRelaxedOpcodeBranch()

static unsigned getRelaxedOpcodeBranch ( const MCInst &  Inst,
bool  is16BitMode 
)
static

Definition at line 181 of file X86AsmBackend.cpp.

References llvm::MCInst::getOpcode().

Referenced by getFixupKindSize(), and getRelaxedOpcode().

◆ hasVariantSymbol()

static bool hasVariantSymbol ( const MCInst &  MI)
static

◆ isFirstMacroFusibleInst()

static bool isFirstMacroFusibleInst ( const MCInst &  Inst,
const MCInstrInfo &  MCII 
)
static

◆ isRIPRelative()

static bool isRIPRelative ( const MCInst &  MI,
const MCInstrInfo &  MCII 
)
static