32#ifndef __GPU_COMPUTE_OPERAND_INFO_HH__
33#define __GPU_COMPUTE_OPERAND_INFO_HH__
35#include "arch/gpu_registers.hh"
37#include "config/the_gpu_isa.hh"
47 bool vector_reg,
bool imm)
59 if (TheGpuISA::isVccReg(opSelectorVal))
61 if (TheGpuISA::isExecMask(opSelectorVal))
63 if (TheGpuISA::isFlatScratchReg(opSelectorVal))
65 if (TheGpuISA::isLiteral(opSelectorVal))
67 if (TheGpuISA::isConstVal(opSelectorVal))
69 if (TheGpuISA::isPosConstVal(opSelectorVal))
89 return TheGpuISA::opSelectorToRegIdx(
_opSelectorVal, numScalarRegs);
Wrapper that groups a few flag bits under the same undelying container.
const int _size
Size of the operand in bytes.
std::vector< int > _physIndices
bool isFlatScratch() const
int physIdx(int reg_num=0) const
void setVirtToPhysMapping(std::vector< int > v, std::vector< int > p)
const int _numDWords
Size of operand in DWords.
std::vector< int > & bankReadCounts() const
int registerIndex(int numScalarRegs) const
std::vector< int > _virtIndices
OperandInfo(int opSelectorVal, int size, bool src, bool scalar_reg, bool vector_reg, bool imm)
const std::vector< int > & virtIndices() const
const int _opSelectorVal
Value of the operand as used in registers.cc functions.
const std::vector< int > & physIndices() const
std::vector< int > _bankReadCounts
The number of reads this operand will make to each bank.
int rawRegisterIndex() const
gem5::Flags< FlagsType > Flags
int virtIdx(int reg_num=0) const
We typically only need the first virtual register for the operand regardless of its size.
void set(Type mask)
Set all flag's bits matching the given mask.
bool isSet(Type mask) const
Verifies whether any bit matching the given mask is set.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.