Go to the documentation of this file.
28 #ifndef __ARCH_X86_INSTS_MICROOP_ARGS_HH__
29 #define __ARCH_X86_INSTS_MICROOP_ARGS_HH__
35 #include <type_traits>
59 template <
class InstType>
61 size(inst->getDestSize())
72 template <
class InstType>
74 size(inst->getSrcSize())
85 template <
class InstType>
87 size(inst->getSrcSize())
119 template <
class T,
class Enabled=
void>
123 struct HasDataSize<T, decltype((void)&T::dataSize)> :
public std::true_type {};
128 template <
class Base>
133 template <
class Inst>
138 template <
class Inst>
139 IntOp(Inst *inst, std::enable_if_t<!HasDataSizeV<Inst>,
ArgType> idx) :
151 template <
class Base>
156 template <
class InstType>
169 template <
class Base>
174 template <
class InstType>
184 template <
class Base>
189 template <
class InstType>
200 template <
class Base>
205 template <
class InstType>
215 template <
class Base>
220 template <
class InstType>
231 template <
class Base>
236 template <
class Inst>
241 template <
class Inst>
285 template <
class InstType>
301 template <
class InstType>
317 template <
class InstType>
333 template <
class InstType>
361 template <
class InstType>
366 size(inst->addressSize)
379 template <
typename Base,
typename ...Operands>
383 using ArgTuple = std::tuple<
typename Operands::ArgType...>;
385 template <std::size_t ...I,
typename ...CTorArgs>
387 const char *mnem,
const char *inst_mnem, uint64_t set_flags,
388 OpClass op_class, [[maybe_unused]]
ArgTuple args,
389 CTorArgs... ctor_args) :
390 Base(mach_inst, mnem, inst_mnem, set_flags, op_class, ctor_args...),
391 Operands(this,
std::get<I>(args))...
395 template <
typename ...CTorArgs>
397 const char *inst_mnem, uint64_t set_flags, OpClass op_class,
398 ArgTuple args, CTorArgs... ctor_args) :
400 mach_inst, mnem, inst_mnem, set_flags, op_class,
401 std::move(args), ctor_args...)
408 std::stringstream response;
409 Base::printMnemonic(response, this->instMnem, this->mnemonic);
411 GEM5_FOR_EACH_IN_PACK(
ccprintf(response,
count++ ?
", " :
""),
412 Operands::print(response));
413 return response.str();
420 #endif //__ARCH_X86_INSTS_MICROOP_ARGS_HH__
UpcOp(InstType *inst, ArgType _target)
void print(std::ostream &os) const
void print(std::ostream &os) const
FaultOp(InstType *inst, ArgType _fault)
Src1Op(RegIndex _src1, size_t _size)
FoldedOp(InstType *inst, ArgType idx)
Imm8Op(InstType *inst, ArgType _imm8)
Classes for register indices passed to instruction constructors.
void print(std::ostream &os) const
void print(std::ostream &os) const
DestOp(RegIndex _dest, size_t _size)
void print(std::ostream &os) const
Src2Op(RegIndex _src2, size_t _size)
Imm64Op(InstType *inst, ArgType _imm64)
Src1Op(RegIndex _src1, InstType *inst)
DataLowOp(RegIndex data_low, size_t _size)
InstOperands(ExtMachInst mach_inst, const char *mnem, const char *inst_mnem, uint64_t set_flags, OpClass op_class, ArgTuple args, CTorArgs... ctor_args)
static void printMem(std::ostream &os, uint8_t segment, uint8_t scale, RegIndex index, RegIndex base, uint64_t disp, uint8_t addressSize, bool rip)
static IntRegIndex INTREG_FOLDED(int index, int foldBit)
void print(std::ostream &os) const
CrOp(InstType *inst, ArgType idx)
Src2Op(RegIndex _src2, InstType *inst)
FloatOp(Inst *inst, std::enable_if_t<!HasDataSizeV< Inst >, ArgType > idx)
void ccprintf(cp::Print &print)
void print(std::ostream &os) const
IntOp(Inst *inst, std::enable_if_t<!HasDataSizeV< Inst >, ArgType > idx)
@ FloatRegClass
Floating-point register.
std::shared_ptr< FaultBase > Fault
void print(std::ostream &os) const
constexpr bool HasDataSizeV
SegOp(InstType *inst, ArgType idx)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::string generateDisassembly(Addr pc, const loader::SymbolTable *symtab) const override
AddrOp(InstType *inst, const ArgType &args)
DataOp(RegIndex _data, size_t _size)
static void printReg(std::ostream &os, RegId reg, int size)
void print(std::ostream &os) const
DataHiOp(RegIndex data_hi, size_t _size)
void print(std::ostream &os) const
@ IntRegClass
Integer register.
DbgOp(InstType *inst, ArgType idx)
@ MiscRegClass
Control (misc) register.
Overload hash function for BasicBlockRange type.
static void printSegment(std::ostream &os, int segment)
void print(std::ostream &os) const
FloatOp(Inst *inst, std::enable_if_t< HasDataSizeV< Inst >, ArgType > idx)
DestOp(RegIndex _dest, InstType *inst)
MiscOp(InstType *inst, ArgType idx)
void print(std::ostream &os) const
IntOp(Inst *inst, std::enable_if_t< HasDataSizeV< Inst >, ArgType > idx)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
InstOperands(std::index_sequence< I... >, ExtMachInst mach_inst, const char *mnem, const char *inst_mnem, uint64_t set_flags, OpClass op_class, [[maybe_unused]] ArgTuple args, CTorArgs... ctor_args)
std::tuple< typename Operands::ArgType... > ArgTuple
Register ID: describe an architectural register with its class and index.
Generated on Tue Feb 8 2022 11:47:00 for gem5 by doxygen 1.8.17