gem5 v23.0.0.0
|
classes that represnt vector/scalar operands in GCN3 ISA. More...
Functions | |
constexpr size_t | MaxOperandDwords (16) |
const int | NumVecElemPerVecReg (64) |
std::string | opSelectorToRegSym (int opIdx, int numRegs=0) |
int | opSelectorToRegIdx (int opIdx, int numScalarRegs) |
bool | isPosConstVal (int opIdx) |
bool | isNegConstVal (int opIdx) |
bool | isConstVal (int opIdx) |
bool | isLiteral (int opIdx) |
bool | isScalarReg (int opIdx) |
bool | isVectorReg (int opIdx) |
bool | isFlatScratchReg (int opIdx) |
bool | isExecMask (int opIdx) |
bool | isVccReg (int opIdx) |
template<typename T > | |
T | wholeQuadMode (T val) |
template<typename T > | |
T | quadMask (T val) |
template<typename T > | |
ScalarRegI32 | countZeroBits (T val) |
template<typename T > | |
ScalarRegI32 | findFirstZero (T val) |
template<typename T > | |
ScalarRegI32 | findFirstOne (T val) |
template<typename T > | |
ScalarRegI32 | findFirstOneMsb (T val) |
template<typename T > | |
ScalarRegI32 | countZeroBitsMsb (T val) |
ScalarRegI32 | firstOppositeSignBit (ScalarRegI32 val) |
ScalarRegI32 | firstOppositeSignBit (ScalarRegI64 val) |
template<typename T > | |
T | median (T val_0, T val_1, T val_2) |
template<typename T > | |
T | roundNearestEven (T val) |
VecElemU32 | muladd (VecElemU64 &dst, VecElemU32 val_0, VecElemU32 val_1, VecElemU64 val_2) |
VecElemU32 | muladd (VecElemI64 &dst, VecElemI32 val_0, VecElemI32 val_1, VecElemI64 val_2) |
int | dppInstImpl (SqDPPVals dppCtrl, int currLane, int rowNum, int rowOffset, bool &outOfBounds) |
dppInstImpl is a helper function that performs the inputted operation on the inputted vector register lane. | |
template<typename T > | |
void | processDPP (GPUDynInstPtr gpuDynInst, InFmt_VOP_DPP dppInst, T &src0) |
processDPP is a helper function for implementing Data Parallel Primitive instructions. | |
template<typename T > | |
void | processDPP (GPUDynInstPtr gpuDynInst, InFmt_VOP_DPP dppInst, T &src0, T &src1) |
processDPP is a helper function for implementing Data Parallel Primitive instructions. | |
template<typename T > | |
T | sdwaInstSrcImpl_helper (T currOperVal, const T origOperVal, const SDWASelVals sel, const bool signExt) |
sdwaInstSrcImpl_helper contains the per-lane code for selecting the appropriate bytes/words of the lane and doing the appropriate masking/padding/sign extending. | |
template<typename T > | |
void | sdwaInstSrcImpl (T &currOper, T &origCurrOper, const SDWASelVals sel, const bool signExt) |
sdwaInstSrcImpl is a helper function that selects the appropriate bits/bytes for each lane of the inputted source operand of an SDWA instruction, does the appropriate masking/padding/sign extending for the non-selected bits/bytes, and updates the operands values with the resultant value. | |
template<typename T > | |
T | sdwaInstDstImpl_helper (T currDstVal, const T origDstVal, const bool clamp, const SDWASelVals sel, const SDWADstVals unusedBits_format) |
sdwaInstDstImpl_helper contains the per-lane code for selecting the appropriate bytes/words of the lane and doing the appropriate masking/padding/sign extending. | |
template<typename T > | |
void | sdwaInstDstImpl (T &dstOper, T &origDstOper, const bool clamp, const SDWASelVals sel, const SDWADstVals unusedBits_format) |
sdwaInstDestImpl is a helper function that selects the appropriate bits/bytes for the inputted dest operand of an SDWA instruction, does the appropriate masking/padding/sign extending for the non-selected bits/bytes, and updates the operands values with the resultant value. | |
template<typename T > | |
void | processSDWA_src_helper (T &currSrc, T &origCurrSrc, const SDWASelVals src_sel, const bool src_signExt, const bool src_abs, const bool src_neg) |
processSDWA_srcHelper is a helper function for implementing sub d-word addressing instructions for the src operands. | |
template<typename T > | |
void | processSDWA_src (InFmt_VOP_SDWA sdwaInst, T &src0, T &origSrc0) |
processSDWA_src is a helper function for implementing sub d-word addressing instructions for the src operands. | |
template<typename T > | |
void | processSDWA_src (InFmt_VOP_SDWA sdwaInst, T &src0, T &origSrc0, T &src1, T &origSrc1) |
processSDWA_src is a helper function for implementing sub d-word addressing instructions. | |
template<typename T > | |
void | processSDWA_dst (InFmt_VOP_SDWA sdwaInst, T &dst, T &origDst) |
processSDWA_dst is a helper function for implementing sub d-word addressing instructions for the dst operand. | |
Variables | |
const int | NumPosConstRegs |
const int | NumNegConstRegs |
const int | BITS_PER_BYTE = 8 |
const int | BITS_PER_WORD = 16 |
const int | MSB_PER_BYTE = (BITS_PER_BYTE - 1) |
const int | MSB_PER_WORD = (BITS_PER_WORD - 1) |
const int | DWordSize = sizeof(VecElemU32) |
const int | RegSizeDWords = sizeof(VecElemU32) / DWordSize |
Size of a single-precision register in DWords. | |
classes that represnt vector/scalar operands in GCN3 ISA.
these classes wrap the generic vector register type (i.e., src/arch/generic/vec_reg.hh) and allow them to be manipulated in ways that are unique to GCN3 insts.
using gem5::Gcn3ISA::ConstScalarOperandF32 = typedef ScalarOperand<ScalarRegF32, true> |
Definition at line 711 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandF64 = typedef ScalarOperand<ScalarRegF64, true> |
Definition at line 714 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandI16 = typedef ScalarOperand<ScalarRegI16, true, 1> |
Definition at line 708 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandI32 = typedef ScalarOperand<ScalarRegI32, true> |
Definition at line 710 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandI64 = typedef ScalarOperand<ScalarRegI64, true> |
Definition at line 713 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandI8 = typedef ScalarOperand<ScalarRegI8, true, 1> |
Definition at line 706 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandU128 = typedef ScalarOperand<ScalarRegU32, true, 4> |
Definition at line 715 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandU16 = typedef ScalarOperand<ScalarRegU16, true, 1> |
Definition at line 707 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandU256 = typedef ScalarOperand<ScalarRegU32, true, 8> |
Definition at line 716 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandU32 = typedef ScalarOperand<ScalarRegU32, true> |
Definition at line 709 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandU512 = typedef ScalarOperand<ScalarRegU32, true, 16> |
Definition at line 717 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandU64 = typedef ScalarOperand<ScalarRegU64, true> |
Definition at line 712 of file operand.hh.
using gem5::Gcn3ISA::ConstScalarOperandU8 = typedef ScalarOperand<ScalarRegU8, true, 1> |
Definition at line 705 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandF32 = typedef VecOperand<VecElemF32, true> |
Definition at line 740 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandF64 = typedef VecOperand<VecElemF64, true> |
Definition at line 743 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandI16 = typedef VecOperand<VecElemI16, true, 1> |
Definition at line 737 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandI32 = typedef VecOperand<VecElemI32, true> |
Definition at line 739 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandI64 = typedef VecOperand<VecElemI64, true> |
Definition at line 742 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandI8 = typedef VecOperand<VecElemI8, true, 1> |
Definition at line 735 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU128 = typedef VecOperand<VecElemU32, true, 4> |
Definition at line 745 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU16 = typedef VecOperand<VecElemU16, true, 1> |
Definition at line 736 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU256 = typedef VecOperand<VecElemU32, true, 8> |
Definition at line 746 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU32 = typedef VecOperand<VecElemU32, true> |
Definition at line 738 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU512 = typedef VecOperand<VecElemU32, true, 16> |
Definition at line 747 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU64 = typedef VecOperand<VecElemU64, true> |
Definition at line 741 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU8 = typedef VecOperand<VecElemU8, true, 1> |
Definition at line 734 of file operand.hh.
using gem5::Gcn3ISA::ConstVecOperandU96 = typedef VecOperand<VecElemU32, true, 3> |
Definition at line 744 of file operand.hh.
using gem5::Gcn3ISA::IsaDecodeMethod = typedef GPUStaticInst*(Decoder::*)(MachInst) |
Definition at line 50 of file gpu_decoder.hh.
typedef InstFormat* gem5::Gcn3ISA::MachInst |
used to represent the encoding of a GCN3 inst.
each portion of a GCN3 inst must be 1 DWORD (32b), so we use a pointer to InstFormat type (which is 32b). for the case in which we need multiple DWORDS to represnt a single inst, this pointer essentialy acts as an array of the DWORDs needed to represent the entire inst encoding.
Definition at line 61 of file gpu_types.hh.
typedef uint64_t gem5::Gcn3ISA::RawMachInst |
used to represnt a GPU inst in its raw format.
GCN3 instructions may be 32b or 64b, therefore we represent a raw inst with 64b to ensure that all of its inst data, including potential immediate values, may be represented in the worst case.
Definition at line 51 of file gpu_types.hh.
using gem5::Gcn3ISA::ScalarOperandF32 = typedef ScalarOperand<ScalarRegF32, false> |
Definition at line 697 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandF64 = typedef ScalarOperand<ScalarRegF64, false> |
Definition at line 700 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandI16 = typedef ScalarOperand<ScalarRegI16, false, 1> |
Definition at line 694 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandI32 = typedef ScalarOperand<ScalarRegI32, false> |
Definition at line 696 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandI64 = typedef ScalarOperand<ScalarRegI64, false> |
Definition at line 699 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandI8 = typedef ScalarOperand<ScalarRegI8, false, 1> |
Definition at line 692 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandU128 = typedef ScalarOperand<ScalarRegU32, false, 4> |
Definition at line 701 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandU16 = typedef ScalarOperand<ScalarRegU16, false, 1> |
Definition at line 693 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandU256 = typedef ScalarOperand<ScalarRegU32, false, 8> |
Definition at line 702 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandU32 = typedef ScalarOperand<ScalarRegU32, false> |
Definition at line 695 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandU512 = typedef ScalarOperand<ScalarRegU32, false, 16> |
Definition at line 703 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandU64 = typedef ScalarOperand<ScalarRegU64, false> |
Definition at line 698 of file operand.hh.
using gem5::Gcn3ISA::ScalarOperandU8 = typedef ScalarOperand<ScalarRegU8, false, 1> |
Definition at line 691 of file operand.hh.
typedef float gem5::Gcn3ISA::ScalarRegF32 |
Definition at line 155 of file gpu_registers.hh.
typedef double gem5::Gcn3ISA::ScalarRegF64 |
Definition at line 158 of file gpu_registers.hh.
typedef int16_t gem5::Gcn3ISA::ScalarRegI16 |
Definition at line 152 of file gpu_registers.hh.
typedef int32_t gem5::Gcn3ISA::ScalarRegI32 |
Definition at line 154 of file gpu_registers.hh.
typedef int64_t gem5::Gcn3ISA::ScalarRegI64 |
Definition at line 157 of file gpu_registers.hh.
typedef int8_t gem5::Gcn3ISA::ScalarRegI8 |
Definition at line 150 of file gpu_registers.hh.
typedef uint16_t gem5::Gcn3ISA::ScalarRegU16 |
Definition at line 151 of file gpu_registers.hh.
typedef uint32_t gem5::Gcn3ISA::ScalarRegU32 |
Definition at line 153 of file gpu_registers.hh.
typedef uint64_t gem5::Gcn3ISA::ScalarRegU64 |
Definition at line 156 of file gpu_registers.hh.
typedef uint8_t gem5::Gcn3ISA::ScalarRegU8 |
Definition at line 149 of file gpu_registers.hh.
typedef float gem5::Gcn3ISA::VecElemF32 |
Definition at line 167 of file gpu_registers.hh.
typedef double gem5::Gcn3ISA::VecElemF64 |
Definition at line 170 of file gpu_registers.hh.
typedef int16_t gem5::Gcn3ISA::VecElemI16 |
Definition at line 164 of file gpu_registers.hh.
typedef int32_t gem5::Gcn3ISA::VecElemI32 |
Definition at line 166 of file gpu_registers.hh.
typedef int64_t gem5::Gcn3ISA::VecElemI64 |
Definition at line 169 of file gpu_registers.hh.
typedef int8_t gem5::Gcn3ISA::VecElemI8 |
Definition at line 162 of file gpu_registers.hh.
typedef uint16_t gem5::Gcn3ISA::VecElemU16 |
Definition at line 163 of file gpu_registers.hh.
typedef uint32_t gem5::Gcn3ISA::VecElemU32 |
Definition at line 165 of file gpu_registers.hh.
typedef uint64_t gem5::Gcn3ISA::VecElemU64 |
Definition at line 168 of file gpu_registers.hh.
typedef uint8_t gem5::Gcn3ISA::VecElemU8 |
Definition at line 161 of file gpu_registers.hh.
using gem5::Gcn3ISA::VecOperandF32 = typedef VecOperand<VecElemF32, false> |
Definition at line 725 of file operand.hh.
using gem5::Gcn3ISA::VecOperandF64 = typedef VecOperand<VecElemF64, false> |
Definition at line 727 of file operand.hh.
using gem5::Gcn3ISA::VecOperandI16 = typedef VecOperand<VecElemI16, false, 1> |
Definition at line 722 of file operand.hh.
using gem5::Gcn3ISA::VecOperandI32 = typedef VecOperand<VecElemI32, false> |
Definition at line 724 of file operand.hh.
using gem5::Gcn3ISA::VecOperandI64 = typedef VecOperand<VecElemI64, false> |
Definition at line 728 of file operand.hh.
using gem5::Gcn3ISA::VecOperandI8 = typedef VecOperand<VecElemI8, false, 1> |
Definition at line 720 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU128 = typedef VecOperand<VecElemU32, false, 4> |
Definition at line 730 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU16 = typedef VecOperand<VecElemU16, false, 1> |
Definition at line 721 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU256 = typedef VecOperand<VecElemU32, false, 8> |
Definition at line 731 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU32 = typedef VecOperand<VecElemU32, false> |
Definition at line 723 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU512 = typedef VecOperand<VecElemU32, false, 16> |
Definition at line 732 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU64 = typedef VecOperand<VecElemU64, false> |
Definition at line 726 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU8 = typedef VecOperand<VecElemU8, false, 1> |
Definition at line 719 of file operand.hh.
using gem5::Gcn3ISA::VecOperandU96 = typedef VecOperand<VecElemU32, false, 3> |
Definition at line 729 of file operand.hh.
using gem5::Gcn3ISA::VecRegContainerU32 = typedef VecRegContainer<sizeof(VecElemU32) * NumVecElemPerVecReg> |
Definition at line 178 of file gpu_registers.hh.
enum gem5::Gcn3ISA::OpSelector : int |
Definition at line 48 of file gpu_registers.hh.
|
inline |
Definition at line 120 of file inst_util.hh.
References gem5::popCount(), and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_SOP1__S_BCNT0_I32_B32::execute(), and gem5::Gcn3ISA::Inst_SOP1__S_BCNT0_I32_B64::execute().
|
inline |
Definition at line 163 of file inst_util.hh.
References gem5::findMsbSet(), and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_SOP1__S_FLBIT_I32_B32::execute(), and gem5::Gcn3ISA::Inst_SOP1__S_FLBIT_I32_B64::execute().
int gem5::Gcn3ISA::dppInstImpl | ( | SqDPPVals | dppCtrl, |
int | currLane, | ||
int | rowNum, | ||
int | rowOffset, | ||
bool & | outOfBounds | ||
) |
dppInstImpl is a helper function that performs the inputted operation on the inputted vector register lane.
The returned output lane represents the input lane given the destination lane and DPP_CTRL word.
Currently the values are: 0x0 - 0xFF: full permute of four threads 0x100: reserved 0x101 - 0x10F: row shift right by 1-15 threads 0x111 - 0x11F: row shift right by 1-15 threads 0x121 - 0x12F: row shift right by 1-15 threads 0x130: wavefront left shift by 1 thread 0x134: wavefront left rotate by 1 thread 0x138: wavefront right shift by 1 thread 0x13C: wavefront right rotate by 1 thread 0x140: mirror threads within row 0x141: mirror threads within 1/2 row (8 threads) 0x142: broadcast 15th thread of each row to next row 0x143: broadcast thread 31 to rows 2 and 3
Definition at line 318 of file inst_util.hh.
References gem5::X86ISA::count, gem5::ArmISA::NumVecElemPerVecReg, panic, gem5::ROW_SIZE, gem5::SQ_DPP_QUAD_PERM_MAX, gem5::SQ_DPP_RESERVED, gem5::SQ_DPP_ROW_BCAST15, gem5::SQ_DPP_ROW_BCAST31, gem5::SQ_DPP_ROW_HALF_MIRROR, gem5::SQ_DPP_ROW_MIRROR, gem5::SQ_DPP_ROW_RR1, gem5::SQ_DPP_ROW_RR15, gem5::SQ_DPP_ROW_SL1, gem5::SQ_DPP_ROW_SL15, gem5::SQ_DPP_ROW_SR1, gem5::SQ_DPP_ROW_SR15, gem5::SQ_DPP_WF_RL1, gem5::SQ_DPP_WF_RR1, gem5::SQ_DPP_WF_SL1, and gem5::SQ_DPP_WF_SR1.
Referenced by processDPP().
|
inline |
Definition at line 141 of file inst_util.hh.
References gem5::findLsbSet(), and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_SOP1__S_FF1_I32_B32::execute(), gem5::Gcn3ISA::Inst_SOP1__S_FF1_I32_B64::execute(), gem5::Gcn3ISA::Inst_VOP1__V_FFBL_B32::execute(), and gem5::Gcn3ISA::Inst_VOP3__V_FFBL_B32::execute().
|
inline |
Definition at line 152 of file inst_util.hh.
References gem5::findMsbSet(), and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_VOP1__V_FFBH_U32::execute(), and gem5::Gcn3ISA::Inst_VOP3__V_FFBH_U32::execute().
|
inline |
Definition at line 130 of file inst_util.hh.
References gem5::findLsbSet(), and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_SOP1__S_FF0_I32_B32::execute(), and gem5::Gcn3ISA::Inst_SOP1__S_FF0_I32_B64::execute().
|
inline |
Definition at line 173 of file inst_util.hh.
References gem5::X86ISA::count, gem5::ArmISA::i, and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_SOP1__S_FLBIT_I32::execute(), gem5::Gcn3ISA::Inst_SOP1__S_FLBIT_I32_I64::execute(), gem5::Gcn3ISA::Inst_VOP1__V_FFBH_I32::execute(), and gem5::Gcn3ISA::Inst_VOP3__V_FFBH_I32::execute().
|
inline |
Definition at line 209 of file inst_util.hh.
References gem5::X86ISA::count, gem5::ArmISA::i, and gem5::X86ISA::val.
bool gem5::Gcn3ISA::isConstVal | ( | int | opIdx | ) |
Definition at line 188 of file registers.cc.
References isNegConstVal(), and isPosConstVal().
Referenced by gem5::Gcn3ISA::ScalarOperand< DataType, Const, NumDwords >::readSpecialVal().
bool gem5::Gcn3ISA::isExecMask | ( | int | opIdx | ) |
Definition at line 201 of file registers.cc.
References REG_EXEC_HI, and REG_EXEC_LO.
Referenced by gem5::Gcn3ISA::GCN3GPUStaticInst::isExecMaskRegister().
bool gem5::Gcn3ISA::isFlatScratchReg | ( | int | opIdx | ) |
Definition at line 213 of file registers.cc.
References REG_FLAT_SCRATCH_HI, and REG_FLAT_SCRATCH_LO.
Referenced by gem5::Gcn3ISA::GCN3GPUStaticInst::isFlatScratchRegister().
bool gem5::Gcn3ISA::isLiteral | ( | int | opIdx | ) |
Definition at line 195 of file registers.cc.
References REG_SRC_LITERAL.
bool gem5::Gcn3ISA::isNegConstVal | ( | int | opIdx | ) |
Definition at line 179 of file registers.cc.
References REG_INT_CONST_NEG_MAX, and REG_INT_CONST_NEG_MIN.
Referenced by isConstVal(), and gem5::Gcn3ISA::GPUISA::readConstVal().
bool gem5::Gcn3ISA::isPosConstVal | ( | int | opIdx | ) |
Definition at line 170 of file registers.cc.
References REG_INT_CONST_POS_MAX, and REG_INT_CONST_POS_MIN.
Referenced by isConstVal(), and gem5::Gcn3ISA::GPUISA::readConstVal().
bool gem5::Gcn3ISA::isScalarReg | ( | int | opIdx | ) |
Definition at line 219 of file registers.cc.
References REG_FLAT_SCRATCH_HI, REG_FLAT_SCRATCH_LO, REG_SGPR_MAX, REG_VCC_HI, and REG_VCC_LO.
Referenced by gem5::Gcn3ISA::Inst_SOP2::initOperandInfo(), gem5::Gcn3ISA::Inst_SOPK::initOperandInfo(), gem5::Gcn3ISA::Inst_SOP1::initOperandInfo(), gem5::Gcn3ISA::Inst_SOPC::initOperandInfo(), gem5::Gcn3ISA::Inst_SMEM::initOperandInfo(), gem5::Gcn3ISA::Inst_VOP2::initOperandInfo(), gem5::Gcn3ISA::Inst_VOP1::initOperandInfo(), gem5::Gcn3ISA::Inst_VOPC::initOperandInfo(), gem5::Gcn3ISA::Inst_VOP3::initOperandInfo(), gem5::Gcn3ISA::Inst_VOP3_SDST_ENC::initOperandInfo(), gem5::Gcn3ISA::Inst_MUBUF::initOperandInfo(), gem5::Gcn3ISA::Inst_MTBUF::initOperandInfo(), gem5::Gcn3ISA::Inst_MIMG::initOperandInfo(), gem5::Gcn3ISA::ScalarOperand< DataType, Const, NumDwords >::read(), and gem5::Gcn3ISA::ScalarOperand< DataType, Const, NumDwords >::write().
bool gem5::Gcn3ISA::isVccReg | ( | int | opIdx | ) |
Definition at line 207 of file registers.cc.
References REG_VCC_HI, and REG_VCC_LO.
bool gem5::Gcn3ISA::isVectorReg | ( | int | opIdx | ) |
Definition at line 232 of file registers.cc.
References REG_VGPR_MAX, and REG_VGPR_MIN.
Referenced by gem5::Gcn3ISA::Inst_VOP2::initOperandInfo(), gem5::Gcn3ISA::Inst_VOP1::initOperandInfo(), gem5::Gcn3ISA::Inst_VOPC::initOperandInfo(), gem5::Gcn3ISA::Inst_VOP3::initOperandInfo(), gem5::Gcn3ISA::Inst_VOP3_SDST_ENC::initOperandInfo(), and gem5::Gcn3ISA::VecOperand< DataType, Const, NumDwords >::readSrc().
|
constexpr |
|
inline |
Definition at line 246 of file inst_util.hh.
Referenced by gem5::Gcn3ISA::Inst_VOP3__V_MED3_F32::execute(), gem5::Gcn3ISA::Inst_VOP3__V_MED3_I32::execute(), and gem5::Gcn3ISA::Inst_VOP3__V_MED3_U32::execute().
|
inline |
Definition at line 285 of file inst_util.hh.
|
inline |
Definition at line 271 of file inst_util.hh.
Referenced by gem5::Gcn3ISA::Inst_VOP3__V_MAD_U64_U32::execute(), and gem5::Gcn3ISA::Inst_VOP3__V_MAD_I64_I32::execute().
const int gem5::Gcn3ISA::NumVecElemPerVecReg | ( | 64 | ) |
Referenced by gem5::initMemReqHelper().
int gem5::Gcn3ISA::opSelectorToRegIdx | ( | int | opIdx, |
int | numScalarRegs | ||
) |
the VCC register occupies the two highest numbered SRF entries. VCC is typically indexed by specifying VCC_LO (simply called VCC) in the instruction encoding and reading it as a 64b value so we only return the index to the lower half of the VCC register.
VCC_LO = s[NUM_SGPRS - 2] VCC_HI = s[NUM_SGPRS - 1]
the FLAT_SCRATCH register occupies the two SRF entries just below VCC. FLAT_SCRATCH is typically indexed by specifying FLAT_SCRATCH_LO (simply called FLAT_SCRATCH) in the instruction encoding and reading it as a 64b value so we only return the index to the lower half of the FLAT_SCRATCH register.
FLAT_SCRATCH_LO = s[NUM_SGPRS - 4] FLAT_SCRATCH_HI = s[NUM_SGPRS - 3]
the VCC register occupies the two highest numbered SRF entries. VCC is typically indexed by specifying VCC_LO (simply called VCC) in the instruction encoding and reading it as a 64b value so we only return the index to the lower half of the VCC register.
VCC_LO = s[NUM_SGPRS - 2] VCC_HI = s[NUM_SGPRS - 1]
the FLAT_SCRATCH register occupies the two SRF entries just below VCC. FLAT_SCRATCH is typically indexed by specifying FLAT_SCRATCH_LO (simply called FLAT_SCRATCH) in the instruction encoding and reading it as a 64b value so we only return the index to the lower half of the FLAT_SCRATCH register.
FLAT_SCRATCH_LO = s[NUM_SGPRS - 4] FLAT_SCRATCH_HI = s[NUM_SGPRS - 3]
Definition at line 125 of file registers.cc.
References REG_FLAT_SCRATCH_HI, REG_FLAT_SCRATCH_LO, REG_SGPR_MAX, REG_VCC_HI, REG_VCC_LO, REG_VGPR_MAX, and REG_VGPR_MIN.
Referenced by gem5::Gcn3ISA::VecOperand< DataType, Const, NumDwords >::readSrc().
std::string gem5::Gcn3ISA::opSelectorToRegSym | ( | int | opIdx, |
int | numRegs = 0 |
||
) |
Definition at line 40 of file registers.cc.
References fatal, REG_EXEC_LO, REG_FLAT_SCRATCH_HI, REG_FLAT_SCRATCH_LO, REG_INT_CONST_NEG_MAX, REG_INT_CONST_NEG_MIN, REG_INT_CONST_POS_MAX, REG_INT_CONST_POS_MIN, REG_M0, REG_NEG_FOUR, REG_NEG_HALF, REG_NEG_ONE, REG_NEG_TWO, REG_POS_FOUR, REG_POS_HALF, REG_POS_ONE, REG_POS_TWO, REG_SGPR_MAX, REG_VCC_HI, REG_VCC_LO, REG_VGPR_MAX, REG_VGPR_MIN, and REG_ZERO.
Referenced by gem5::Gcn3ISA::Inst_SOP2::generateDisassembly(), gem5::Gcn3ISA::Inst_SOPK::generateDisassembly(), gem5::Gcn3ISA::Inst_SOP1::generateDisassembly(), gem5::Gcn3ISA::Inst_SOPC::generateDisassembly(), gem5::Gcn3ISA::Inst_VOP2::generateDisassembly(), gem5::Gcn3ISA::Inst_VOP1::generateDisassembly(), gem5::Gcn3ISA::Inst_VOPC::generateDisassembly(), gem5::Gcn3ISA::Inst_VOP3::generateDisassembly(), and gem5::Gcn3ISA::Inst_VOP3_SDST_ENC::generateDisassembly().
void gem5::Gcn3ISA::processDPP | ( | GPUDynInstPtr | gpuDynInst, |
InFmt_VOP_DPP | dppInst, | ||
T & | src0 | ||
) |
processDPP is a helper function for implementing Data Parallel Primitive instructions.
This function may be called by many different VOP1 instructions to do operations within a register.
STEP 1a: check if the absolute value (ABS) or negation (NEG) tags are set. If so, do the appropriate action(s) on src0 and/or src1.
NOTE: ABS takes priority over NEG.
STEP 2: check the row and bank mask values. These determine which threads are enabled for the subsequent DPP_CTRL operations.
STEP 4: Handle the potential values of DPP_CTRL: 0x0 - 0xFF: full permute of four threads 0x100: reserved 0x101 - 0x10F: row shift right by 1-15 threads 0x111 - 0x11F: row shift right by 1-15 threads 0x121 - 0x12F: row shift right by 1-15 threads 0x130: wavefront left shift by 1 thread 0x134: wavefront left rotate by 1 thread 0x138: wavefront right shift by 1 thread 0x13C: wavefront right rotate by 1 thread 0x140: mirror threads within row 0x141: mirror threads within 1/2 row (8 threads) 0x142: broadcast 15th thread of each row to next row 0x143: broadcast thread 31 to rows 2 and 3
STEP 4: Implement bound control for disabled threads. If thread is disabled but boundCtrl is set, then we need to set the source data to 0 (i.e., set this lane to 0).
Definition at line 415 of file inst_util.hh.
References gem5::Gcn3ISA::InFmt_VOP_DPP::BANK_MASK, gem5::Gcn3ISA::InFmt_VOP_DPP::BOUND_CTRL, gem5::Gcn3ISA::InFmt_VOP_DPP::DPP_CTRL, dppInstImpl(), gem5::NUM_BANKS, gem5::ArmISA::NumVecElemPerVecReg, gem5::Gcn3ISA::InFmt_VOP_DPP::ROW_MASK, gem5::ROW_SIZE, gem5::Gcn3ISA::InFmt_VOP_DPP::SRC0_ABS, and gem5::Gcn3ISA::InFmt_VOP_DPP::SRC0_NEG.
Referenced by gem5::Gcn3ISA::Inst_VOP2__V_ADD_F32::execute(), gem5::Gcn3ISA::Inst_VOP2__V_MAC_F32::execute(), gem5::Gcn3ISA::Inst_VOP1__V_MOV_B32::execute(), and processDPP().
void gem5::Gcn3ISA::processDPP | ( | GPUDynInstPtr | gpuDynInst, |
InFmt_VOP_DPP | dppInst, | ||
T & | src0, | ||
T & | src1 | ||
) |
processDPP is a helper function for implementing Data Parallel Primitive instructions.
This function may be called by many different VOP2/VOPC instructions to do operations within a register.
STEP 1b: check if the absolute value (ABS) or negation (NEG) tags are set. If so, do the appropriate action(s) on src0 and/or src1.
NOTE: ABS takes priority over NEG.
Definition at line 524 of file inst_util.hh.
References processDPP(), gem5::Gcn3ISA::InFmt_VOP_DPP::SRC1_ABS, and gem5::Gcn3ISA::InFmt_VOP_DPP::SRC1_NEG.
void gem5::Gcn3ISA::processSDWA_dst | ( | InFmt_VOP_SDWA | sdwaInst, |
T & | dst, | ||
T & | origDst | ||
) |
processSDWA_dst is a helper function for implementing sub d-word addressing instructions for the dst operand.
This function may be called by many different VOP1/VOP2/VOPC instructions to do operations within a register. processSDWA_dst is called after the math, while processSDWA_src is called before the math.
STEP 1: select the appropriate bits for dst and pad/sign-extend as appropriate.
Definition at line 879 of file inst_util.hh.
References gem5::Gcn3ISA::InFmt_VOP_SDWA::CLAMP, gem5::Gcn3ISA::InFmt_VOP_SDWA::DST_SEL, gem5::Gcn3ISA::InFmt_VOP_SDWA::DST_UNUSED, and sdwaInstDstImpl().
Referenced by gem5::Gcn3ISA::Inst_VOP2__V_MUL_U32_U24::execute(), gem5::Gcn3ISA::Inst_VOP2__V_LSHLREV_B32::execute(), gem5::Gcn3ISA::Inst_VOP2__V_OR_B32::execute(), and gem5::Gcn3ISA::Inst_VOP2__V_ADD_U32::execute().
void gem5::Gcn3ISA::processSDWA_src | ( | InFmt_VOP_SDWA | sdwaInst, |
T & | src0, | ||
T & | origSrc0 | ||
) |
processSDWA_src is a helper function for implementing sub d-word addressing instructions for the src operands.
This function may be called by many different VOP1 instructions to do operations within a register. processSDWA_dst is called after the math, while processSDWA_src is called before the math.
Definition at line 823 of file inst_util.hh.
References processSDWA_src_helper(), gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_ABS, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_NEG, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_SEL, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_SEXT, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC1_ABS, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC1_NEG, and gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC1_SEXT.
Referenced by gem5::Gcn3ISA::Inst_VOP2__V_MUL_U32_U24::execute(), gem5::Gcn3ISA::Inst_VOP2__V_LSHLREV_B32::execute(), gem5::Gcn3ISA::Inst_VOP2__V_OR_B32::execute(), and gem5::Gcn3ISA::Inst_VOP2__V_ADD_U32::execute().
void gem5::Gcn3ISA::processSDWA_src | ( | InFmt_VOP_SDWA | sdwaInst, |
T & | src0, | ||
T & | origSrc0, | ||
T & | src1, | ||
T & | origSrc1 | ||
) |
processSDWA_src is a helper function for implementing sub d-word addressing instructions.
This function may be called by many different VOP2/VOPC instructions to do operations within a register. processSDWA_dst is called after the math, while processSDWA_src is called before the math.
Definition at line 851 of file inst_util.hh.
References processSDWA_src_helper(), gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_ABS, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_NEG, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_SEL, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC0_SEXT, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC1_ABS, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC1_NEG, gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC1_SEL, and gem5::Gcn3ISA::InFmt_VOP_SDWA::SRC1_SEXT.
void gem5::Gcn3ISA::processSDWA_src_helper | ( | T & | currSrc, |
T & | origCurrSrc, | ||
const SDWASelVals | src_sel, | ||
const bool | src_signExt, | ||
const bool | src_abs, | ||
const bool | src_neg | ||
) |
processSDWA_srcHelper is a helper function for implementing sub d-word addressing instructions for the src operands.
This function may be called by many different VOP1/VOP2/VOPC instructions to do operations within a register. This function is also agnostic of which operand it is operating on, so that it can be called for any src operand.
STEP 1: check if the absolute value (ABS) or negation (NEG) tags are set. If so, do the appropriate action(s) on the src operand.
NOTE: According to the CSim implementation, ABS takes priority over NEG.
STEP 2: select the appropriate bits for each lane of source operand.
Definition at line 788 of file inst_util.hh.
References sdwaInstSrcImpl().
Referenced by processSDWA_src(), and processSDWA_src().
|
inline |
Definition at line 103 of file inst_util.hh.
References gem5::bits(), gem5::ArmISA::mask, and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_SOP1__S_QUADMASK_B32::execute(), and gem5::Gcn3ISA::Inst_SOP1__S_QUADMASK_B64::execute().
|
inline |
Definition at line 258 of file inst_util.hh.
References gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_VOP1__V_RNDNE_F64::execute(), gem5::Gcn3ISA::Inst_VOP1__V_RNDNE_F32::execute(), gem5::Gcn3ISA::Inst_VOP3__V_RNDNE_F64::execute(), and gem5::Gcn3ISA::Inst_VOP3__V_RNDNE_F32::execute().
void gem5::Gcn3ISA::sdwaInstDstImpl | ( | T & | dstOper, |
T & | origDstOper, | ||
const bool | clamp, | ||
const SDWASelVals | sel, | ||
const SDWADstVals | unusedBits_format | ||
) |
sdwaInstDestImpl is a helper function that selects the appropriate bits/bytes for the inputted dest operand of an SDWA instruction, does the appropriate masking/padding/sign extending for the non-selected bits/bytes, and updates the operands values with the resultant value.
The desired behavior is:
Definition at line 767 of file inst_util.hh.
References gem5::ArmISA::NumVecElemPerVecReg, sdwaInstDstImpl_helper(), and gem5::ArmISA::sel.
Referenced by processSDWA_dst().
T gem5::Gcn3ISA::sdwaInstDstImpl_helper | ( | T | currDstVal, |
const T | origDstVal, | ||
const bool | clamp, | ||
const SDWASelVals | sel, | ||
const SDWADstVals | unusedBits_format | ||
) |
sdwaInstDstImpl_helper contains the per-lane code for selecting the appropriate bytes/words of the lane and doing the appropriate masking/padding/sign extending.
It returns the value after these operations are done on it.
Definition at line 666 of file inst_util.hh.
References gem5::bits(), BITS_PER_BYTE, BITS_PER_WORD, gem5::insertBits(), MSB_PER_BYTE, MSB_PER_WORD, panic, gem5::SDWA_DWORD, gem5::SDWA_UNUSED_PRESERVE, gem5::SDWA_UNUSED_SEXT, gem5::SDWA_WORD_0, and gem5::ArmISA::sel.
Referenced by sdwaInstDstImpl().
void gem5::Gcn3ISA::sdwaInstSrcImpl | ( | T & | currOper, |
T & | origCurrOper, | ||
const SDWASelVals | sel, | ||
const bool | signExt | ||
) |
sdwaInstSrcImpl is a helper function that selects the appropriate bits/bytes for each lane of the inputted source operand of an SDWA instruction, does the appropriate masking/padding/sign extending for the non-selected bits/bytes, and updates the operands values with the resultant value.
The desired behavior is:
Definition at line 647 of file inst_util.hh.
References gem5::ArmISA::NumVecElemPerVecReg, sdwaInstSrcImpl_helper(), and gem5::ArmISA::sel.
Referenced by processSDWA_src_helper().
T gem5::Gcn3ISA::sdwaInstSrcImpl_helper | ( | T | currOperVal, |
const T | origOperVal, | ||
const SDWASelVals | sel, | ||
const bool | signExt | ||
) |
sdwaInstSrcImpl_helper contains the per-lane code for selecting the appropriate bytes/words of the lane and doing the appropriate masking/padding/sign extending.
It returns the value after these operations are done on it.
Definition at line 554 of file inst_util.hh.
References gem5::bits(), BITS_PER_BYTE, BITS_PER_WORD, fatal_if, MSB_PER_BYTE, MSB_PER_WORD, panic, gem5::SDWA_DWORD, gem5::SDWA_WORD_0, and gem5::ArmISA::sel.
Referenced by sdwaInstSrcImpl().
|
inline |
Definition at line 89 of file inst_util.hh.
References gem5::bits(), gem5::ArmISA::mask, and gem5::X86ISA::val.
Referenced by gem5::Gcn3ISA::Inst_SOP1__S_WQM_B32::execute(), and gem5::Gcn3ISA::Inst_SOP1__S_WQM_B64::execute().
const int gem5::Gcn3ISA::BITS_PER_BYTE = 8 |
Definition at line 143 of file gpu_registers.hh.
Referenced by sdwaInstDstImpl_helper(), and sdwaInstSrcImpl_helper().
const int gem5::Gcn3ISA::BITS_PER_WORD = 16 |
Definition at line 144 of file gpu_registers.hh.
Referenced by sdwaInstDstImpl_helper(), and sdwaInstSrcImpl_helper().
const int gem5::Gcn3ISA::DWordSize = sizeof(VecElemU32) |
Definition at line 172 of file gpu_registers.hh.
const int gem5::Gcn3ISA::MSB_PER_BYTE = (BITS_PER_BYTE - 1) |
Definition at line 145 of file gpu_registers.hh.
Referenced by sdwaInstDstImpl_helper(), and sdwaInstSrcImpl_helper().
const int gem5::Gcn3ISA::MSB_PER_WORD = (BITS_PER_WORD - 1) |
Definition at line 146 of file gpu_registers.hh.
Referenced by sdwaInstDstImpl_helper(), and sdwaInstSrcImpl_helper().
const int gem5::Gcn3ISA::NumNegConstRegs |
Definition at line 141 of file gpu_registers.hh.
const int gem5::Gcn3ISA::NumPosConstRegs |
Definition at line 138 of file gpu_registers.hh.
const int gem5::Gcn3ISA::RegSizeDWords = sizeof(VecElemU32) / DWordSize |
Size of a single-precision register in DWords.
Definition at line 176 of file gpu_registers.hh.