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>
60 template <
class InstType>
62 size(inst->getDestSize())
73 template <
class InstType>
75 size(inst->getSrcSize())
86 template <
class InstType>
88 size(inst->getSrcSize())
120 template <
class T,
class Enabled=
void>
124 struct HasDataSize<T, decltype((void)&T::dataSize)> :
public std::true_type {};
129 template <
class Base>
134 template <
class Inst>
139 template <
class Inst>
140 IntOp(Inst *inst, std::enable_if_t<!HasDataSizeV<Inst>,
ArgType> idx) :
152 template <
class Base>
157 template <
class InstType>
170 template <
class Base>
175 template <
class InstType>
185 template <
class Base>
190 template <
class InstType>
201 template <
class Base>
206 template <
class InstType>
216 template <
class Base>
221 template <
class InstType>
232 template <
class Base>
237 template <
class Inst>
242 template <
class Inst>
286 template <
class InstType>
302 template <
class InstType>
318 template <
class InstType>
334 template <
class InstType>
362 template <
class InstType>
367 size(inst->addressSize)
380 template <
typename Base,
typename ...Operands>
384 using ArgTuple = std::tuple<
typename Operands::ArgType...>;
386 template <std::size_t ...I,
typename ...CTorArgs>
388 const char *mnem,
const char *inst_mnem, uint64_t set_flags,
389 OpClass op_class, [[maybe_unused]]
ArgTuple args,
390 CTorArgs... ctor_args) :
391 Base(mach_inst, mnem, inst_mnem, set_flags, op_class, ctor_args...),
392 Operands(this,
std::get<I>(args))...
396 template <
typename ...CTorArgs>
398 const char *inst_mnem, uint64_t set_flags, OpClass op_class,
399 ArgTuple args, CTorArgs... ctor_args) :
401 mach_inst, mnem, inst_mnem, set_flags, op_class,
402 std::move(args), ctor_args...)
409 std::stringstream response;
410 Base::printMnemonic(response, this->instMnem, this->mnemonic);
412 GEM5_FOR_EACH_IN_PACK(
ccprintf(response,
count++ ?
", " :
""),
413 Operands::print(response));
414 return response.str();
421 #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)
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
static constexpr RegId intRegFolded(RegIndex index, RegIndex foldBit)
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 Wed Jul 13 2022 10:39:13 for gem5 by doxygen 1.8.17