LLVM API Documentation

llvm::X86II Namespace Reference


Enumerations

enum  TOF {
  MO_NO_FLAG, MO_GOT_ABSOLUTE_ADDRESS, MO_PIC_BASE_OFFSET, MO_GOT,
  MO_GOTOFF, MO_GOTPCREL, MO_PLT, MO_TLSGD,
  MO_GOTTPOFF, MO_INDNTPOFF, MO_TPOFF, MO_NTPOFF,
  MO_DLLIMPORT, MO_DARWIN_STUB, MO_DARWIN_NONLAZY, MO_DARWIN_NONLAZY_PIC_BASE,
  MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE
}
 Target Operand Flag enum. More...
enum  {
  Pseudo = 0, RawFrm = 1, AddRegFrm = 2, MRMDestReg = 3,
  MRMDestMem = 4, MRMSrcReg = 5, MRMSrcMem = 6, MRM0r = 16,
  MRM1r = 17, MRM2r = 18, MRM3r = 19, MRM4r = 20,
  MRM5r = 21, MRM6r = 22, MRM7r = 23, MRM0m = 24,
  MRM1m = 25, MRM2m = 26, MRM3m = 27, MRM4m = 28,
  MRM5m = 29, MRM6m = 30, MRM7m = 31, MRMInitReg = 32,
  MRM_C1 = 33, MRM_C2 = 34, MRM_C3 = 35, MRM_C4 = 36,
  MRM_C8 = 37, MRM_C9 = 38, MRM_E8 = 39, MRM_F0 = 40,
  MRM_F8 = 41, MRM_F9 = 42, FormMask = 63, OpSize = 1 << 6,
  AdSize = 1 << 7, Op0Shift = 8, Op0Mask = 0xF << Op0Shift, TB = 1 << Op0Shift,
  REP = 2 << Op0Shift, D8 = 3 << Op0Shift, D9 = 4 << Op0Shift, DA = 5 << Op0Shift,
  DB = 6 << Op0Shift, DC = 7 << Op0Shift, DD = 8 << Op0Shift, DE = 9 << Op0Shift,
  DF = 10 << Op0Shift, XD = 11 << Op0Shift, XS = 12 << Op0Shift, T8 = 13 << Op0Shift,
  TA = 14 << Op0Shift, TF = 15 << Op0Shift, REXShift = 12, REX_W = 1 << REXShift,
  ImmShift = 13, ImmMask = 7 << ImmShift, Imm8 = 1 << ImmShift, Imm8PCRel = 2 << ImmShift,
  Imm16 = 3 << ImmShift, Imm32 = 4 << ImmShift, Imm32PCRel = 5 << ImmShift, Imm64 = 6 << ImmShift,
  FPTypeShift = 16, FPTypeMask = 7 << FPTypeShift, NotFP = 0 << FPTypeShift, ZeroArgFP = 1 << FPTypeShift,
  OneArgFP = 2 << FPTypeShift, OneArgFPRW = 3 << FPTypeShift, TwoArgFP = 4 << FPTypeShift, CompareFP = 5 << FPTypeShift,
  CondMovFP = 6 << FPTypeShift, SpecialFP = 7 << FPTypeShift, LOCKShift = 19, LOCK = 1 << LOCKShift,
  SegOvrShift = 20, SegOvrMask = 3 << SegOvrShift, FS = 1 << SegOvrShift, GS = 2 << SegOvrShift,
  OpcodeShift = 24, OpcodeMask = 0xFF << OpcodeShift
}

Functions

static unsigned char getBaseOpcodeFor (unsigned TSFlags)
static bool hasImm (unsigned TSFlags)
static unsigned getSizeOfImm (unsigned TSFlags)
static unsigned isImmPCRel (unsigned TSFlags)

Detailed Description

X86II - This namespace holds all of the target specific flags that instruction info tracks.


Enumeration Type Documentation

anonymous enum

Enumerator:
Pseudo 
RawFrm  Raw - This form is for instructions that don't have any operands, so they are just a fixed opcode value, like 'leave'.
AddRegFrm  AddRegFrm - This form is used for instructions like 'push r32' that have their one register operand added to their opcode.
MRMDestReg  MRMDestReg - This form is used for instructions that use the Mod/RM byte to specify a destination, which in this case is a register.
MRMDestMem  MRMDestMem - This form is used for instructions that use the Mod/RM byte to specify a destination, which in this case is memory.
MRMSrcReg  MRMSrcReg - This form is used for instructions that use the Mod/RM byte to specify a source, which in this case is a register.
MRMSrcMem  MRMSrcMem - This form is used for instructions that use the Mod/RM byte to specify a source, which in this case is memory.
MRM0r  MRM[0-7][rm] - These forms are used to represent instructions that use a Mod/RM byte, and use the middle field to hold extended opcode information. In the intel manual these are represented as /0, /1, ...
MRM1r 
MRM2r 
MRM3r 
MRM4r 
MRM5r 
MRM6r 
MRM7r 
MRM0m 
MRM1m 
MRM2m 
MRM3m 
MRM4m 
MRM5m 
MRM6m 
MRM7m 
MRMInitReg 
MRM_C1 
MRM_C2 
MRM_C3 
MRM_C4 
MRM_C8 
MRM_C9 
MRM_E8 
MRM_F0 
MRM_F8 
MRM_F9 
FormMask 
OpSize 
AdSize 
Op0Shift 
Op0Mask 
TB 
REP 
D8 
D9 
DA 
DB 
DC 
DD 
DE 
DF 
XD 
XS 
T8 
TA 
TF 
REXShift 
REX_W 
ImmShift 
ImmMask 
Imm8 
Imm8PCRel 
Imm16 
Imm32 
Imm32PCRel 
Imm64 
FPTypeShift 
FPTypeMask 
NotFP 
ZeroArgFP 
OneArgFP 
OneArgFPRW 
TwoArgFP 
CompareFP 
CondMovFP 
SpecialFP 
LOCKShift 
LOCK 
SegOvrShift 
SegOvrMask 
FS 
GS 
OpcodeShift 
OpcodeMask 

Definition at line 216 of file X86InstrInfo.h.

Target Operand Flag enum.

Enumerator:
MO_NO_FLAG 
MO_GOT_ABSOLUTE_ADDRESS  MO_GOT_ABSOLUTE_ADDRESS - On a symbol operand, this represents a relocation of: SYMBOL_LABEL + [. - PICBASELABEL]
MO_PIC_BASE_OFFSET  MO_PIC_BASE_OFFSET - On a symbol operand this indicates that the immediate should get the value of the symbol minus the PIC base label: SYMBOL_LABEL - PICBASELABEL
MO_GOT  MO_GOT - On a symbol operand this indicates that the immediate is the offset to the GOT entry for the symbol name from the base of the GOT.

See the X86-64 ELF ABI supplement for more details. SYMBOL_LABEL

MO_GOTOFF  MO_GOTOFF - On a symbol operand this indicates that the immediate is the offset to the location of the symbol name from the base of the GOT.

See the X86-64 ELF ABI supplement for more details. SYMBOL_LABEL

MO_GOTPCREL  MO_GOTPCREL - On a symbol operand this indicates that the immediate is offset to the GOT entry for the symbol name from the current code location.

See the X86-64 ELF ABI supplement for more details. SYMBOL_LABEL

MO_PLT  MO_PLT - On a symbol operand this indicates that the immediate is offset to the PLT entry of symbol name from the current code location.

See the X86-64 ELF ABI supplement for more details. SYMBOL_LABEL

MO_TLSGD  MO_TLSGD - On a symbol operand this indicates that the immediate is some TLS offset.

See 'ELF Handling for Thread-Local Storage' for more details. SYMBOL_LABEL

MO_GOTTPOFF  MO_GOTTPOFF - On a symbol operand this indicates that the immediate is some TLS offset.

See 'ELF Handling for Thread-Local Storage' for more details. SYMBOL_LABEL

MO_INDNTPOFF  MO_INDNTPOFF - On a symbol operand this indicates that the immediate is some TLS offset.

See 'ELF Handling for Thread-Local Storage' for more details. SYMBOL_LABEL

MO_TPOFF  MO_TPOFF - On a symbol operand this indicates that the immediate is some TLS offset.

See 'ELF Handling for Thread-Local Storage' for more details. SYMBOL_LABEL

MO_NTPOFF  MO_NTPOFF - On a symbol operand this indicates that the immediate is some TLS offset.

See 'ELF Handling for Thread-Local Storage' for more details. SYMBOL_LABEL

MO_DLLIMPORT  MO_DLLIMPORT - On a symbol operand "FOO", this indicates that the reference is actually to the "__imp_FOO" symbol. This is used for dllimport linkage on windows.
MO_DARWIN_STUB  MO_DARWIN_STUB - On a symbol operand "FOO", this indicates that the reference is actually to the "FOO$stub" symbol. This is used for calls and jumps to external functions on Tiger and before.
MO_DARWIN_NONLAZY  MO_DARWIN_NONLAZY - On a symbol operand "FOO", this indicates that the reference is actually to the "FOO$non_lazy_ptr" symbol, which is a non-PIC-base-relative reference to a non-hidden dyld lazy pointer stub.
MO_DARWIN_NONLAZY_PIC_BASE  MO_DARWIN_NONLAZY_PIC_BASE - On a symbol operand "FOO", this indicates that the reference is actually to "FOO$non_lazy_ptr - PICBASE", which is a PIC-base-relative reference to a non-hidden dyld lazy pointer stub.
MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE  MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE - On a symbol operand "FOO", this indicates that the reference is actually to "FOO$non_lazy_ptr -PICBASE", which is a PIC-base-relative reference to a hidden dyld lazy pointer stub.

Definition at line 72 of file X86InstrInfo.h.


Function Documentation

static unsigned char llvm::X86II::getBaseOpcodeFor ( unsigned  TSFlags  )  [inline, static]

Definition at line 409 of file X86InstrInfo.h.

References OpcodeShift.

static unsigned llvm::X86II::getSizeOfImm ( unsigned  TSFlags  )  [inline, static]

getSizeOfImm - Decode the "size of immediate" field from the TSFlags field of the specified instruction.

Definition at line 419 of file X86InstrInfo.h.

References Imm16, Imm32, Imm32PCRel, Imm64, Imm8, Imm8PCRel, and ImmMask.

Referenced by getImmFixupKind(), and GetInstSizeWithDesc().

static bool llvm::X86II::hasImm ( unsigned  TSFlags  )  [inline, static]

Definition at line 413 of file X86InstrInfo.h.

References ImmMask.

static unsigned llvm::X86II::isImmPCRel ( unsigned  TSFlags  )  [inline, static]

isImmPCRel - Return true if the immediate of the specified instruction's TSFlags indicates that it is pc relative.

Definition at line 433 of file X86InstrInfo.h.

References Imm16, Imm32, Imm32PCRel, Imm64, Imm8, Imm8PCRel, and ImmMask.

Referenced by getImmFixupKind().