Lines Matching refs:TSFlags
126 uint64_t TSFlags, bool Rex, unsigned &CurByte,
134 void EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, int MemOperand,
141 bool emitOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, int MemOperand,
145 uint8_t DetermineREXPrefix(const MCInst &MI, uint64_t TSFlags,
165 static bool isCDisp8(uint64_t TSFlags, int Value, int& CValue) { in isCDisp8() argument
166 assert(((TSFlags & X86II::EncodingMask) == X86II::EVEX) && in isCDisp8()
170 (TSFlags & X86II::CD8_Scale_Mask) >> X86II::CD8_Scale_Shift; in isCDisp8()
190 static MCFixupKind getImmFixupKind(uint64_t TSFlags) { in getImmFixupKind() argument
191 unsigned Size = X86II::getSizeOfImm(TSFlags); in getImmFixupKind()
192 bool isPCRel = X86II::isImmPCRel(TSFlags); in getImmFixupKind()
194 if (X86II::isImmSigned(TSFlags)) { in getImmFixupKind()
350 uint64_t TSFlags, bool Rex, in emitMemModRMByte() argument
359 bool HasEVEX = (TSFlags & X86II::EncodingMask) == X86II::EVEX; in emitMemModRMByte()
400 int ImmSize = X86II::hasImm(TSFlags) ? X86II::getSizeOfImm(TSFlags) : 0; in emitMemModRMByte()
509 if (HasEVEX && isCDisp8(TSFlags, Disp.getImm(), CDisp8)) { in emitMemModRMByte()
554 } else if (HasEVEX && isCDisp8(TSFlags, Disp.getImm(), CDisp8)) { in emitMemModRMByte()
596 void X86MCCodeEmitter::EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, in EmitVEXOpcodePrefix() argument
600 assert(!(TSFlags & X86II::LOCK) && "Can't have LOCK VEX."); in EmitVEXOpcodePrefix()
602 uint64_t Encoding = TSFlags & X86II::EncodingMask; in EmitVEXOpcodePrefix()
603 bool HasEVEX_K = TSFlags & X86II::EVEX_K; in EmitVEXOpcodePrefix()
604 bool HasVEX_4V = TSFlags & X86II::VEX_4V; in EmitVEXOpcodePrefix()
605 bool HasVEX_4VOp3 = TSFlags & X86II::VEX_4VOp3; in EmitVEXOpcodePrefix()
606 bool HasMemOp4 = TSFlags & X86II::MemOp4; in EmitVEXOpcodePrefix()
607 bool HasEVEX_RC = TSFlags & X86II::EVEX_RC; in EmitVEXOpcodePrefix()
634 uint8_t VEX_W = (TSFlags & X86II::VEX_W) ? 1 : 0; in EmitVEXOpcodePrefix()
647 switch (TSFlags & X86II::OpMapMask) { in EmitVEXOpcodePrefix()
669 uint8_t VEX_L = (TSFlags & X86II::VEX_L) ? 1 : 0; in EmitVEXOpcodePrefix()
670 uint8_t EVEX_L2 = (TSFlags & X86II::EVEX_L2) ? 1 : 0; in EmitVEXOpcodePrefix()
681 switch (TSFlags & X86II::OpPrefixMask) { in EmitVEXOpcodePrefix()
693 uint8_t EVEX_z = (HasEVEX_K && (TSFlags & X86II::EVEX_Z)) ? 1 : 0; in EmitVEXOpcodePrefix()
696 uint8_t EVEX_b = (TSFlags & X86II::EVEX_B) ? 1 : 0; in EmitVEXOpcodePrefix()
710 switch (TSFlags & X86II::FormMask) { in EmitVEXOpcodePrefix()
958 uint8_t X86MCCodeEmitter::DetermineREXPrefix(const MCInst &MI, uint64_t TSFlags, in DetermineREXPrefix() argument
964 if (TSFlags & X86II::REX_W) in DetermineREXPrefix()
986 switch (TSFlags & X86II::FormMask) { in DetermineREXPrefix()
1057 bool X86MCCodeEmitter::emitOpcodePrefix(uint64_t TSFlags, unsigned &CurByte, in emitOpcodePrefix() argument
1064 if ((TSFlags & X86II::OpSizeMask) == (is16BitMode(STI) ? X86II::OpSize32 in emitOpcodePrefix()
1069 if (TSFlags & X86II::LOCK) in emitOpcodePrefix()
1072 switch (TSFlags & X86II::OpPrefixMask) { in emitOpcodePrefix()
1087 if (uint8_t REX = DetermineREXPrefix(MI, TSFlags, MemOperand, Desc)) { in emitOpcodePrefix()
1094 switch (TSFlags & X86II::OpMapMask) { in emitOpcodePrefix()
1102 switch (TSFlags & X86II::OpMapMask) { in emitOpcodePrefix()
1119 uint64_t TSFlags = Desc.TSFlags; in encodeInstruction() local
1122 if ((TSFlags & X86II::FormMask) == X86II::Pseudo) in encodeInstruction()
1132 uint64_t Encoding = TSFlags & X86II::EncodingMask; in encodeInstruction()
1135 bool HasVEX_4V = TSFlags & X86II::VEX_4V; in encodeInstruction()
1136 bool HasVEX_4VOp3 = TSFlags & X86II::VEX_4VOp3; in encodeInstruction()
1137 bool HasMemOp4 = TSFlags & X86II::MemOp4; in encodeInstruction()
1138 bool HasVEX_I8IMM = TSFlags & X86II::VEX_I8IMM; in encodeInstruction()
1142 bool HasEVEX_K = TSFlags & X86II::EVEX_K; in encodeInstruction()
1143 bool HasEVEX_RC = TSFlags & X86II::EVEX_RC; in encodeInstruction()
1149 int MemoryOperand = X86II::getMemoryOperandNo(TSFlags); in encodeInstruction()
1158 if (TSFlags & X86II::REP) in encodeInstruction()
1163 uint64_t AdSize = TSFlags & X86II::AdSizeMask; in encodeInstruction()
1187 Rex = emitOpcodePrefix(TSFlags, CurByte, MemoryOperand, MI, Desc, STI, OS); in encodeInstruction()
1189 EmitVEXOpcodePrefix(TSFlags, CurByte, MemoryOperand, MI, Desc, OS); in encodeInstruction()
1191 uint8_t BaseOpcode = X86II::getBaseOpcodeFor(TSFlags); in encodeInstruction()
1193 if (TSFlags & X86II::Has3DNow0F0FOpcode) in encodeInstruction()
1196 uint64_t Form = TSFlags & X86II::FormMask; in encodeInstruction()
1250 X86II::getSizeOfImm(TSFlags), getImmFixupKind(TSFlags), in encodeInstruction()
1257 X86II::getSizeOfImm(TSFlags), getImmFixupKind(TSFlags), in encodeInstruction()
1265 X86II::getSizeOfImm(TSFlags), getImmFixupKind(TSFlags), in encodeInstruction()
1300 emitMemModRMByte(MI, CurOp, GetX86RegNum(MI.getOperand(SrcRegNum)), TSFlags, in encodeInstruction()
1345 TSFlags, Rex, CurByte, OS, Fixups, STI); in encodeInstruction()
1381 (Form == X86II::MRMXm) ? 0 : Form - X86II::MRM0m, TSFlags, in encodeInstruction()
1431 X86II::getSizeOfImm(TSFlags), getImmFixupKind(TSFlags), in encodeInstruction()
1436 if (TSFlags & X86II::Has3DNow0F0FOpcode) in encodeInstruction()
1437 EmitByte(X86II::getBaseOpcodeFor(TSFlags), CurByte, OS); in encodeInstruction()