• Home
  • Raw
  • Download

Lines Matching refs:Instr

57 static const char *isInvalidMemoryInstr(const Instruction &Instr) {  in isInvalidMemoryInstr()  argument
58 switch (Instr.Description.TSFlags & X86II::FormMask) { in isInvalidMemoryInstr()
157 return (Instr.Description.Opcode == X86::POP16r || in isInvalidMemoryInstr()
158 Instr.Description.Opcode == X86::POP32r || in isInvalidMemoryInstr()
159 Instr.Description.Opcode == X86::PUSH16r || in isInvalidMemoryInstr()
160 Instr.Description.Opcode == X86::PUSH32r) in isInvalidMemoryInstr()
192 static const char *isInvalidOpcode(const Instruction &Instr) { in isInvalidOpcode() argument
193 const auto OpcodeName = Instr.Name; in isInvalidOpcode()
194 if ((Instr.Description.TSFlags & X86II::FormMask) == X86II::Pseudo) in isInvalidOpcode()
199 if (const auto reason = isInvalidMemoryInstr(Instr)) in isInvalidOpcode()
202 for (const Operand &Op : Instr.Operands) in isInvalidOpcode()
208 for (const Operand &Op : Instr.Operands) in isInvalidOpcode()
215 static unsigned getX86FPFlags(const Instruction &Instr) { in getX86FPFlags() argument
216 return Instr.Description.TSFlags & X86II::FPTypeMask; in getX86FPFlags()
230 const Instruction &Instr, const BitVector &ForbiddenRegisters, in generateLEATemplatesCommon() argument
234 assert(Instr.Operands.size() == 6 && "invalid LEA"); in generateLEATemplatesCommon()
235 assert(X86II::getMemoryOperandNo(Instr.Description.TSFlags) == 1 && in generateLEATemplatesCommon()
242 Instr.Operands[kDestOp].getRegisterAliasing().sourceBits(); in generateLEATemplatesCommon()
245 Instr.Operands[kBaseOp].getRegisterAliasing().sourceBits(); in generateLEATemplatesCommon()
248 Instr.Operands[kIndexOp].getRegisterAliasing().sourceBits(); in generateLEATemplatesCommon()
258 InstructionTemplate IT(&Instr); in generateLEATemplatesCommon()
307 const Instruction &Instr = Variant.getInstr(); in generateCodeTemplates() local
309 if (const auto reason = isInvalidOpcode(Instr)) in generateCodeTemplates()
313 const auto Opcode = Instr.Description.getOpcode(); in generateCodeTemplates()
316 Instr, ForbiddenRegisters, State, Opts, in generateCodeTemplates()
326 if (Instr.hasMemoryOperands()) in generateCodeTemplates()
330 switch (getX86FPFlags(Instr)) { in generateCodeTemplates()
367 const Instruction &Instr = Variant.getInstr(); in generateCodeTemplates() local
369 if (const auto reason = isInvalidOpcode(Instr)) in generateCodeTemplates()
373 const auto Opcode = Instr.Description.getOpcode(); in generateCodeTemplates()
376 Instr, ForbiddenRegisters, State, Opts, in generateCodeTemplates()
387 switch (getX86FPFlags(Instr)) { in generateCodeTemplates()
676 Error randomizeTargetMCOperand(const Instruction &Instr, const Variable &Var,
696 bool allowAsBackToBack(const Instruction &Instr) const override { in allowAsBackToBack()
697 const unsigned Opcode = Instr.Description.Opcode; in allowAsBackToBack()
698 return !isInvalidOpcode(Instr) && Opcode != X86::LEA64r && in allowAsBackToBack()
703 generateInstructionVariants(const Instruction &Instr,
780 const Instruction &Instr, const Variable &Var, MCOperand &AssignedValue, in randomizeTargetMCOperand() argument
782 const Operand &Op = Instr.getPrimaryOperand(Var); in randomizeTargetMCOperand()
877 const Instruction &Instr, unsigned MaxConfigsPerOpcode) const { in generateInstructionVariants() argument
880 VariableChoices.resize(Instr.Variables.size()); in generateInstructionVariants()
881 for (auto I : llvm::zip(Instr.Variables, VariableChoices)) { in generateInstructionVariants()
885 switch (Instr.getPrimaryOperand(Var).getExplicitOperandInfo().OperandType) { in generateInstructionVariants()
904 return ExegesisTarget::generateInstructionVariants(Instr, in generateInstructionVariants()
917 Variants.emplace_back(&Instr); in generateInstructionVariants()