36 #ifndef __ARCH_HSAIL_INSTS_BRANCH_HH__ 37 #define __ARCH_HSAIL_INSTS_BRANCH_HH__ 50 template<
typename TargetType>
66 target.init(op_offs, obj);
69 uint32_t
getTargetPc()
override {
return target.getTarget(0, 0); }
73 return target.isVectorRegister();
77 return target.isCondRegister();
81 return target.isScalarRegister();
95 return target.opSize();
102 return target.regIndex();
112 template<
typename TargetType>
116 std::string widthClause;
126 template<
typename TargetType>
165 template<
typename TargetType>
181 cond.
init(op_offs, obj);
183 target.init(op_offs, obj);
186 uint32_t
getTargetPc()
override {
return target.getTarget(0, 0); }
193 return target.isVectorRegister();
200 return target.isCondRegister();
207 return target.isScalarRegister();
213 if (operandIndex == 0)
224 return target.opSize();
233 return target.regIndex();
244 template<
typename TargetType>
248 std::string widthClause;
258 template<
typename TargetType>
265 const uint32_t curr_rpc = w->
rpc();
275 const uint32_t rpc =
static_cast<uint32_t
>(
ipdInstNum());
276 if (curr_rpc != rpc) {
284 true_mask[lane] =
cond.get<
bool>(
w, lane) & curr_mask[lane];
289 assert(true_pc != false_pc);
290 if (false_pc != rpc && true_mask.count() < curr_mask.count()) {
291 VectorMask false_mask = curr_mask & ~true_mask;
295 if (true_pc != rpc && true_mask.count()) {
298 assert(w->
pc() != curr_pc);
334 template<
typename TargetType>
350 target.init(op_offs, obj);
353 uint32_t
getTargetPc()
override {
return target.getTarget(0, 0); }
358 return target.isVectorRegister();
362 return target.isCondRegister();
366 return target.isScalarRegister();
375 return target.opSize();
381 return target.regIndex();
386 template<
typename TargetType>
390 std::string widthClause;
392 if (
width.bits != 1) {
400 template<
typename TargetType>
441 #endif // __ARCH_HSAIL_INSTS_BRANCH_HH__
uint32_t getTargetPc() override
BrnIndirectInst(const Brig::BrigInstBase *ib, const BrigObject *obj)
Defines classes encapsulating HSAIL instruction operands.
BrigDataOffsetOperandList32_t operands
bool isScalarRegister(int operandIndex) override
BrnInstBase(const Brig::BrigInstBase *ib, const BrigObject *obj)
GPUStaticInst * decodeBrn(const Brig::BrigInstBase *ib, const BrigObject *obj)
CbrDirectInst(const Brig::BrigInstBase *ib, const BrigObject *obj)
std::bitset< std::numeric_limits< unsigned long long >::digits > VectorMask
bool isVectorRegister(int operandIndex) override
void pushToReconvergenceStack(uint32_t pc, uint32_t rpc, const VectorMask &exec_mask)
void execute(GPUDynInstPtr gpuDynInst) override
bool isCondRegister(int operandIndex) override
bool isSrcOperand(int operandIndex) override
BrnDirectInst(const Brig::BrigInstBase *ib, const BrigObject *obj)
uint32_t getTargetPc() override
CbrIndirectInst(const Brig::BrigInstBase *ib, const BrigObject *obj)
void generateDisassembly() override
GPUStaticInst * decodeBr(const Brig::BrigInstBase *ib, const BrigObject *obj)
ImmOperand< uint32_t > width
int getRegisterIndex(int operandIndex, GPUDynInstPtr gpuDynInst) override
std::shared_ptr< GPUDynInst > GPUDynInstPtr
bool init(unsigned opOffset, const BrigObject *obj)
std::string csprintf(const char *format, const Args &...args)
int getNumOperands() override
unsigned getOperandPtr(int offs, int index) const
int getNumOperands() override
bool isVectorRegister(int operandIndex) override
void execute(GPUDynInstPtr gpuDynInst) override
ComputeUnit * computeUnit
BrDirectInst(const Brig::BrigInstBase *ib, const BrigObject *obj)
bool isDstOperand(int operandIndex) override
void generateDisassembly() override
GPUStaticInst * decodeCbr(const Brig::BrigInstBase *ib, const BrigObject *obj)
int getOperandSize(int operandIndex) override
int getOperandSize(int operandIndex) override
bool isDstOperand(int operandIndex) override
bool isSrcOperand(int operandIndex) override
bool isCondRegister(int operandIndex) override
bool isCondRegister(int operandIndex) override
void generateDisassembly() override
int getRegisterIndex(int operandIndex, GPUDynInstPtr gpuDynInst) override
bool isDstOperand(int operandIndex) override
int getNumOperands() override
bool isScalarRegister(int operandIndex) override
VectorMask execMask() const
void popFromReconvergenceStack()
BrIndirectInst(const Brig::BrigInstBase *ib, const BrigObject *obj)
uint32_t getTargetPc() override
void execute(GPUDynInstPtr gpuDynInst) override
bool isSrcOperand(int operandIndex) override
CbrInstBase(const Brig::BrigInstBase *ib, const BrigObject *obj)
bool isScalarRegister(int operandIndex) override
static const int NumArgumentRegs M5_VAR_USED
BrInstBase(const Brig::BrigInstBase *ib, const BrigObject *obj)
int getOperandSize(int operandIndex) override
bool init(unsigned opOffset, const BrigObject *obj)
bool isVectorRegister(int operandIndex) override
int getRegisterIndex(int operandIndex, GPUDynInstPtr gpuDynInst) override