LLVM 22.0.0git
llvm::X86_MC Namespace Reference

Classes

class  X86MCInstrAnalysis

Functions

static std::vector< std::pair< uint64_t, uint64_t > > findX86PltEntries (uint64_t PltSectionVA, ArrayRef< uint8_t > PltContents)
static std::vector< std::pair< uint64_t, uint64_t > > findX86_64PltEntries (uint64_t PltSectionVA, ArrayRef< uint8_t > PltContents)
std::string ParseX86Triple (const Triple &TT)
unsigned getDwarfRegFlavour (const Triple &TT, bool isEH)
void initLLVMToSEHAndCVRegMapping (MCRegisterInfo *MRI)
bool hasLockPrefix (const MCInst &MI)
 Returns true if this instruction has a LOCK prefix.
bool is16BitMemOperand (const MCInst &MI, unsigned Op, const MCSubtargetInfo &STI)
bool is32BitMemOperand (const MCInst &MI, unsigned Op)
bool is64BitMemOperand (const MCInst &MI, unsigned Op)
bool needsAddressSizeOverride (const MCInst &MI, const MCSubtargetInfo &STI, int MemoryOperand, uint64_t TSFlags)
 Returns true if this instruction needs an Address-Size override prefix.
MCSubtargetInfocreateX86MCSubtargetInfo (const Triple &TT, StringRef CPU, StringRef FS)
 Create a X86 MCSubtargetInfo instance.
void emitInstruction (MCObjectStreamer &, const MCInst &Inst, const MCSubtargetInfo &STI)
void emitPrefix (MCCodeEmitter &MCE, const MCInst &MI, SmallVectorImpl< char > &CB, const MCSubtargetInfo &STI)

Function Documentation

◆ createX86MCSubtargetInfo()

MCSubtargetInfo * llvm::X86_MC::createX86MCSubtargetInfo ( const Triple & TT,
StringRef CPU,
StringRef FS )

Create a X86 MCSubtargetInfo instance.

This is exposed so Asm parser, etc. do not need to go through TargetRegistry.

Definition at line 390 of file X86MCTargetDesc.cpp.

References assert(), and ParseX86Triple().

Referenced by LLVMInitializeX86TargetMC().

◆ emitInstruction()

void llvm::X86_MC::emitInstruction ( MCObjectStreamer & S,
const MCInst & Inst,
const MCSubtargetInfo & STI )

◆ emitPrefix()

void llvm::X86_MC::emitPrefix ( MCCodeEmitter & MCE,
const MCInst & MI,
SmallVectorImpl< char > & CB,
const MCSubtargetInfo & STI )

Definition at line 1547 of file X86MCCodeEmitter.cpp.

References emitPrefix(), and MI.

Referenced by emitPrefix().

◆ findX86_64PltEntries()

std::vector< std::pair< uint64_t, uint64_t > > llvm::X86_MC::findX86_64PltEntries ( uint64_t PltSectionVA,
ArrayRef< uint8_t > PltContents )
static

◆ findX86PltEntries()

std::vector< std::pair< uint64_t, uint64_t > > llvm::X86_MC::findX86PltEntries ( uint64_t PltSectionVA,
ArrayRef< uint8_t > PltContents )
static

◆ getDwarfRegFlavour()

unsigned llvm::X86_MC::getDwarfRegFlavour ( const Triple & TT,
bool isEH )

◆ hasLockPrefix()

bool llvm::X86_MC::hasLockPrefix ( const MCInst & MI)

Returns true if this instruction has a LOCK prefix.

Definition at line 73 of file X86MCTargetDesc.cpp.

References llvm::X86::IP_HAS_LOCK, and MI.

◆ initLLVMToSEHAndCVRegMapping()

void llvm::X86_MC::initLLVMToSEHAndCVRegMapping ( MCRegisterInfo * MRI)

Definition at line 168 of file X86MCTargetDesc.cpp.

References I, and MRI.

Referenced by createX86MCRegisterInfo(), and llvm::X86RegisterInfo::X86RegisterInfo().

◆ is16BitMemOperand()

bool llvm::X86_MC::is16BitMemOperand ( const MCInst & MI,
unsigned Op,
const MCSubtargetInfo & STI )
Parameters
Opoperand # of the memory operand.
Returns
true if the specified instruction has a 16-bit memory operand.

Definition at line 86 of file X86MCTargetDesc.cpp.

References llvm::X86::AddrBaseReg, llvm::X86::AddrIndexReg, llvm::sampleprof::Base, llvm::MCSubtargetInfo::hasFeature(), isMemOperand(), and MI.

Referenced by needsAddressSizeOverride().

◆ is32BitMemOperand()

bool llvm::X86_MC::is32BitMemOperand ( const MCInst & MI,
unsigned Op )
Parameters
Opoperand # of the memory operand.
Returns
true if the specified instruction has a 32-bit memory operand.

Definition at line 97 of file X86MCTargetDesc.cpp.

References llvm::X86::AddrBaseReg, llvm::X86::AddrIndexReg, assert(), llvm::sampleprof::Base, isMemOperand(), and MI.

Referenced by needsAddressSizeOverride().

◆ is64BitMemOperand()

bool llvm::X86_MC::is64BitMemOperand ( const MCInst & MI,
unsigned Op )
Parameters
Opoperand # of the memory operand.
Returns
true if the specified instruction has a 64-bit memory operand.

Definition at line 110 of file X86MCTargetDesc.cpp.

References isMemOperand(), and MI.

Referenced by needsAddressSizeOverride().

◆ needsAddressSizeOverride()

bool llvm::X86_MC::needsAddressSizeOverride ( const MCInst & MI,
const MCSubtargetInfo & STI,
int MemoryOperand,
uint64_t TSFlags )

◆ ParseX86Triple()

std::string llvm::X86_MC::ParseX86Triple ( const Triple & TT)

Definition at line 47 of file X86MCTargetDesc.cpp.

References llvm::Triple::CODE16.

Referenced by createX86MCSubtargetInfo().