17 #ifndef LLVM_LIB_TARGET_X86_MCTARGETDESC_X86BASEINFO_H
18 #define LLVM_LIB_TARGET_X86_MCTARGETDESC_X86BASEINFO_H
22 #include "llvm/Support/DataTypes.h"
684 return 1 + HasVEX_4V + HasMemOp4 + HasEVEX_K;
697 return 0 + HasVEX_4V + HasEVEX_K;
723 if ((RegNo > X86::XMM7 && RegNo <= X86::XMM15) ||
724 (RegNo > X86::XMM23 && RegNo <= X86::XMM31) ||
725 (RegNo > X86::YMM7 && RegNo <= X86::YMM15) ||
726 (RegNo > X86::YMM23 && RegNo <= X86::YMM31) ||
727 (RegNo > X86::ZMM7 && RegNo <= X86::ZMM15) ||
728 (RegNo > X86::ZMM23 && RegNo <= X86::ZMM31))
733 case X86::R8:
case X86::R9:
case X86::R10:
case X86::R11:
734 case X86::R12:
case X86::R13:
case X86::R14:
case X86::R15:
735 case X86::R8D:
case X86::R9D:
case X86::R10D:
case X86::R11D:
736 case X86::R12D:
case X86::R13D:
case X86::R14D:
case X86::R15D:
737 case X86::R8W:
case X86::R9W:
case X86::R10W:
case X86::R11W:
738 case X86::R12W:
case X86::R13W:
case X86::R14W:
case X86::R15W:
739 case X86::R8B:
case X86::R9B:
case X86::R10B:
case X86::R11B:
740 case X86::R12B:
case X86::R13B:
case X86::R14B:
case X86::R15B:
741 case X86::CR8:
case X86::CR9:
case X86::CR10:
case X86::CR11:
742 case X86::CR12:
case X86::CR13:
case X86::CR14:
case X86::CR15:
751 return ((RegNo > X86::XMM15 && RegNo <= X86::XMM31) ||
752 (RegNo > X86::YMM15 && RegNo <= X86::YMM31) ||
753 (RegNo > X86::ZMM15 && RegNo <= X86::ZMM31));
758 return (reg == X86::SPL || reg == X86::BPL ||
759 reg == X86::SIL || reg == X86::DIL);
MO_SECREL - On a symbol operand this indicates that the immediate is the offset from beginning of sec...
MRMX[rm] - The forms are used to represent instructions that use a Mod/RM byte, and don't use the mid...
AddrSegmentReg - The operand # of the segment in the memory operand.
bool isX86_64NonExtLowByteReg(unsigned reg)
MO_TLSLD - On a symbol operand this indicates that the immediate is the offset of the GOT entry with ...
MO_TLVP_PIC_BASE - On a symbol operand this indicates that the immediate is some TLS offset from the ...
RawFrmSrc - This form is for instructions that use the source index register SI/ESI/ERI with a possib...
Describe properties that are true of each instruction in the target description file.
RawFrmSrc - This form is for instructions that use the source index register SI/ESI/RSI with a possib...
VEX_L - Stands for a bit in the VEX opcode prefix meaning the current instruction uses 256-bit wide r...
MRMDestMem - This form is used for instructions that use the Mod/RM byte to specify a destination...
int getOperandBias(const MCInstrDesc &Desc)
getOperandBias - compute any additional adjustment needed to the offset to the start of the memory op...
MO_GOTPCREL - On a symbol operand this indicates that the immediate is offset to the GOT entry for th...
MO_DTPOFF - On a symbol operand this indicates that the immediate is the offset of the GOT entry with...
unsigned isImmPCRel(uint64_t TSFlags)
isImmPCRel - Return true if the immediate of the specified instruction's TSFlags indicates that it is...
Has3DNow0F0FOpcode - This flag indicates that the instruction uses the wacky 0x0F 0x0F prefix for 3DN...
MO_DARWIN_NONLAZY_PIC_BASE - On a symbol operand "FOO", this indicates that the reference is actually...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
AddrNumOperands - Total number of operands in a memory reference.
MO_GOT - On a symbol operand this indicates that the immediate is the offset to the GOT entry for the...
VEX_4V - Used to specify an additional AVX/SSE register.
MO_GOTTPOFF - On a symbol operand this indicates that the immediate is the offset of the GOT entry wi...
bool hasImm(uint64_t TSFlags)
MO_DARWIN_NONLAZY - On a symbol operand "FOO", this indicates that the reference is actually to the "...
MO_DARWIN_HIDDEN_NONLAZY_PIC_BASE - On a symbol operand "FOO", this indicates that the reference is a...
bool isX86_64ExtendedReg(unsigned RegNo)
isX86_64ExtendedReg - Is the MachineOperand a x86-64 extended (r8 or higher) register? e.g.
MO_DARWIN_STUB - On a symbol operand "FOO", this indicates that the reference is actually to the "FOO...
MO_GOT_ABSOLUTE_ADDRESS - On a symbol operand, this represents a relocation of: SYMBOL_LABEL + [...
MO_GOTNTPOFF - On a symbol operand this indicates that the immediate is the offset of the GOT entry w...
MO_TLVP - On a symbol operand this indicates that the immediate is some TLS offset.
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.
MRMDestReg - This form is used for instructions that use the Mod/RM byte to specify a destination...
MO_TLSLDM - On a symbol operand this indicates that the immediate is the offset of the GOT entry with...
XOP - Opcode prefix used by XOP instructions.
MO_NTPOFF - On a symbol operand this indicates that the immediate is the negative thread-pointer offs...
MemOp4 - Used to indicate swapping of operand 3 and 4 to be encoded in ModRM or I8IMM.
unsigned isImmSigned(uint64_t TSFlags)
isImmSigned - Return true if the immediate of the specified instruction's TSFlags indicates that it i...
int getOperandConstraint(unsigned OpNum, MCOI::OperandConstraint Constraint) const
Returns the value of the specific constraint if it is set.
Windows x64, Windows Itanium (IA-64)
VEX_I8IMM - Specifies that the last register used in a AVX instruction, must be encoded in the i8 imm...
MO_TLSGD - On a symbol operand this indicates that the immediate is the offset of the GOT entry with ...
MO_TPOFF - On a symbol operand this indicates that the immediate is the thread-pointer offset for the...
static bool is32ExtendedReg(unsigned RegNo)
is32ExtendedReg - Is the MemoryOperand a 32 extended (zmm16 or higher) registers? e...
MRMSrcReg - This form is used for instructions that use the Mod/RM byte to specify a source...
RawFrmImm16 - This is used for CALL FAR instructions, which have two immediates, the first of which i...
unsigned char getBaseOpcodeFor(uint64_t TSFlags)
Raw - This form is for instructions that don't have any operands, so they are just a fixed opcode val...
AddRegFrm - This form is used for instructions like 'push r32' that have their one register operand a...
Explicitly specified rounding control.
MO_GOTOFF - On a symbol operand this indicates that the immediate is the offset to the location of th...
RawFrmImm8 - This is used for the ENTER instruction, which has two immediates, the first of which is ...
MO_INDNTPOFF - On a symbol operand this indicates that the immediate is the absolute address of the G...
MRMSrcMem - This form is used for instructions that use the Mod/RM byte to specify a source...
unsigned getSizeOfImm(uint64_t TSFlags)
getSizeOfImm - Decode the "size of immediate" field from the TSFlags field of the specified instructi...
TOF
Target Operand Flag enum.
MO_PLT - On a symbol operand this indicates that the immediate is offset to the PLT entry of symbol n...
RawFrmDst - This form is for instructions that use the destination index register DI/EDI/ESI...
int getMemoryOperandNo(uint64_t TSFlags, unsigned Opcode)
getMemoryOperandNo - The function returns the MCInst operand # for the first field of the memory oper...
VEX_4VOp3 - Similar to VEX_4V, but used on instructions that encode operand 3 with VEX...
unsigned getNumOperands() const
Return the number of declared MachineOperands for this MachineInstruction.
RawFrmMemOffs - This form is for instructions that store an absolute memory offset as an immediate wi...
MO_PIC_BASE_OFFSET - On a symbol operand this indicates that the immediate should get the value of th...
VEX_W - Has a opcode specific functionality, but is used in the same way as REX_W is for regular SSE ...
MO_DLLIMPORT - On a symbol operand "FOO", this indicates that the reference is actually to the "__imp...