LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Enumerations | Functions
X86MCCodeEmitter.cpp File Reference
#include "MCTargetDesc/X86MCTargetDesc.h"
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86FixupKinds.h"
#include "llvm/MC/MCCodeEmitter.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for X86MCCodeEmitter.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "mccodeemitter"
 

Enumerations

enum  GlobalOffsetTableExprKind { GOT_None, GOT_Normal, GOT_SymDiff }
 

Functions

static bool isDisp8 (int Value)
 
static bool isCDisp8 (uint64_t TSFlags, int Value, int &CValue)
 
static MCFixupKind getImmFixupKind (uint64_t TSFlags)
 
static bool Is32BitMemOperand (const MCInst &MI, unsigned Op)
 
static bool Is64BitMemOperand (const MCInst &MI, unsigned Op)
 
static bool Is16BitMemOperand (const MCInst &MI, unsigned Op)
 
static GlobalOffsetTableExprKind StartsWithGlobalOffsetTable (const MCExpr *Expr)
 
static bool HasSecRelSymbolRef (const MCExpr *Expr)
 
static unsigned DetermineREXPrefix (const MCInst &MI, uint64_t TSFlags, const MCInstrDesc &Desc)
 

Macro Definition Documentation

#define DEBUG_TYPE   "mccodeemitter"

Definition at line 14 of file X86MCCodeEmitter.cpp.

Enumeration Type Documentation

StartsWithGlobalOffsetTable - Check if this expression starts with GLOBAL_OFFSET_TABLE and if it is of the form GLOBAL_OFFSET_TABLE-symbol. This is needed to support PIC on ELF i386 as GLOBAL_OFFSET_TABLE is magical. We check only simple case that are know to be used: GLOBAL_OFFSET_TABLE by itself or at the start of a binary expression.

Enumerator
GOT_None 
GOT_Normal 
GOT_SymDiff 

Definition at line 268 of file X86MCCodeEmitter.cpp.

Function Documentation

static unsigned DetermineREXPrefix ( const MCInst MI,
uint64_t  TSFlags,
const MCInstrDesc Desc 
)
static
static MCFixupKind getImmFixupKind ( uint64_t  TSFlags)
static

getImmFixupKind - Return the appropriate fixup kind to use for an immediate in an instruction with the specified TSFlags.

Definition at line 211 of file X86MCCodeEmitter.cpp.

References llvm::MCFixup::getKindForSize(), llvm::X86II::getSizeOfImm(), and llvm::X86II::isImmPCRel().

static bool HasSecRelSymbolRef ( const MCExpr Expr)
static
static bool Is16BitMemOperand ( const MCInst MI,
unsigned  Op 
)
static

Is16BitMemOperand - Return true if the specified instruction has a 16-bit memory operand. Op specifies the operand # of the memoperand.

Definition at line 250 of file X86MCCodeEmitter.cpp.

References llvm::X86::AddrBaseReg, llvm::X86::AddrIndexReg, llvm::MCInst::getOperand(), and llvm::MCOperand::getReg().

static bool Is32BitMemOperand ( const MCInst MI,
unsigned  Op 
)
static

Is32BitMemOperand - Return true if the specified instruction has a 32-bit memory operand. Op specifies the operand # of the memoperand.

Definition at line 220 of file X86MCCodeEmitter.cpp.

References llvm::X86::AddrBaseReg, llvm::X86::AddrIndexReg, llvm::MCInst::getOperand(), and llvm::MCOperand::getReg().

static bool Is64BitMemOperand ( const MCInst MI,
unsigned  Op 
)
static

Is64BitMemOperand - Return true if the specified instruction has a 64-bit memory operand. Op specifies the operand # of the memoperand.

Definition at line 235 of file X86MCCodeEmitter.cpp.

References llvm::X86::AddrBaseReg, llvm::X86::AddrIndexReg, llvm::MCInst::getOperand(), and llvm::MCOperand::getReg().

static bool isCDisp8 ( uint64_t  TSFlags,
int  Value,
int &  CValue 
)
static
static bool isDisp8 ( int  Value)
static

isDisp8 - Return true if this signed displacement fits in a 8-bit sign-extended field.

Definition at line 159 of file X86MCCodeEmitter.cpp.

Referenced by isCDisp8().

static GlobalOffsetTableExprKind StartsWithGlobalOffsetTable ( const MCExpr Expr)
static