89 int src_val0 =
src1.
get<
int>(
w, lane, 0);
92 fatal(
"Multiple magic instructions per PC not "
176 default:
fatal(
"unrecognized magic instruction: %d\n", op);
187 int src_val1 =
src1.
get<
int>(
w, lane, 1);
188 int src_val2 =
src1.
get<
int>(
w, lane, 2);
190 DPRINTFN(
"krl_prt (%s): CU%d, WF[%d][%d], lane %d: 0x%x\n",
192 w->wfSlotId, lane, src_val1);
194 DPRINTFN(
"krl_prt (%s): CU%d, WF[%d][%d], lane %d: %d\n",
196 w->wfSlotId, lane, src_val1);
210 int64_t src_val1 =
src1.
get<int64_t>(
w, lane, 1);
211 int src_val2 =
src1.
get<
int>(
w, lane, 2);
213 DPRINTFN(
"krl_prt (%s): CU%d, WF[%d][%d], lane %d: 0x%x\n",
215 w->wfSlotId, lane, src_val1);
217 DPRINTFN(
"krl_prt (%s): CU%d, WF[%d][%d], lane %d: %d\n",
219 w->wfSlotId, lane, src_val1);
240 int src_val1 =
src1.
get<
int>(
w, lane, 1);
241 int src_val2 =
src1.
get<
int>(
w, lane, 2);
244 res_str +=
csprintf(
"%08x", src_val1);
246 res_str +=
csprintf(
"%08d", src_val1);
252 if ((lane & 7) == 7) {
279 int src_val1 =
src1.
get<
int>(
w, lane, 1);
280 int src_val2 =
src1.
get<
int>(
w, lane, 2);
281 src_val3 =
src1.
get<
int>(
w, lane, 3);
284 res_str +=
csprintf(
"%08x", src_val1);
286 res_str +=
csprintf(
"%08d", src_val1);
292 if ((lane & 7) == 7) {
320 int64_t src_val1 =
src1.
get<int64_t>(
w, lane, 1);
321 int src_val2 =
src1.
get<
int>(
w, lane, 2);
324 res_str +=
csprintf(
"%016x", src_val1);
326 res_str +=
csprintf(
"%016d", src_val1);
329 res_str +=
csprintf(
"xxxxxxxxxxxxxxxx");
332 if ((lane & 3) == 3) {
359 int64_t src_val1 =
src1.
get<int64_t>(
w, lane, 1);
360 int src_val2 =
src1.
get<
int>(
w, lane, 2);
361 src_val3 =
src1.
get<
int>(
w, lane, 3);
364 res_str +=
csprintf(
"%016x", src_val1);
366 res_str +=
csprintf(
"%016d", src_val1);
369 res_str +=
csprintf(
"xxxxxxxxxxxxxxxx");
372 if ((lane & 3) == 3) {
400 float src_val1 =
src1.
get<
float>(
w, lane, 1);
401 res_str +=
csprintf(
"%08f", src_val1);
406 if ((lane & 7) == 7) {
425 res_str =
csprintf(
"Breakpoint encountered for wavefront %i\n",
431 res_str +=
csprintf(
" Exec mask: ");
445 res_str +=
"\nHelpful debugging hints:\n";
446 res_str +=
" Check out w->s_reg / w->d_reg for register state\n";
463 int src_val1 =
src1.
get<
int>(
w, lane, 1);
482 int src_val1 =
src1.
get<
int>(
w, lane, 1);
502 int src_val1 =
src1.
get<
int>(
w, lane, 1);
505 if (lane < (w->computeUnit->wfSize()/2)) {
506 res = res | ((uint32_t)(1) << lane);
526 int src_val1 =
src1.
get<
int>(
w, lane, 1);
529 if (lane >= (w->computeUnit->wfSize()/2)) {
530 res = res | ((uint32_t)(1) <<
531 (lane - (w->computeUnit->wfSize()/2)));
554 if (w->
barCnt[lane] > max_cnt) {
555 max_cnt = w->
barCnt[lane];
576 if (w->
barCnt[lane] > max_cnt) {
577 max_cnt = w->
barCnt[lane];
581 if (max_cnt < w->maxBarCnt) {
598 int src_val1 =
src1.
get<
int>(
w, lane, 1);
599 panic(
"OpenCL Code failed assertion #%d. Triggered by lane %s",
610 int src_val1 =
src1.
get<
int>(
w, lane, 1);
611 int src_val2 =
src1.
get<
int>(
w, lane, 2);
614 m->addr[lane] =
addr;
627 ((
int*)m->a_data)[lane] =
src1.
get<
int>(
w, lane, 3);
640 m->statusBitVector = 0;
667 ((
int*)m->a_data)[lane] =
src1.
get<
int>(
w, lane, 1);
680 m->statusBitVector = 0;
716 m->statusBitVector = 0;
745 src_val1 =
src1.
get<
int>(
w, lane, 1);
778 bool got_res =
false;
Tick ticks(int numCycles) const
void MagicMaskUpper(Wavefront *w)
std::map< unsigned, waveQueue > xactCasLoadMap
std::bitset< std::numeric_limits< unsigned long long >::digits > VectorMask
void MagicPrintWF64(Wavefront *w)
static const vgpr_type vgprType
void MagicPrintWF32ID(Wavefront *w)
void MagicMostSigBroadcast(Wavefront *w)
void MagicPrintWFID64(Wavefront *w)
void MagicSimBreak(Wavefront *w)
GlobalMemPipeline globalMemoryPipe
std::shared_ptr< GPUDynInst > GPUDynInstPtr
void MagicMaskLower(Wavefront *w)
std::deque< GPUDynInstPtr > instructionBuffer
void MagicWaitWFBar(Wavefront *w)
std::string csprintf(const char *format, const Args &...args)
void calcAddr(Wavefront *w, GPUDynInstPtr m)
void execPseudoInst(Wavefront *w, GPUDynInstPtr gpuDynInst)
void MagicLoadGlobalU32Reg(Wavefront *w, GPUDynInstPtr gpuDynInst)
void MagicPanic(Wavefront *w)
std::vector< int > barCnt
ComputeUnit * computeUnit
uint32_t outstandingReqsRdGm
void MagicPrintWF32(Wavefront *w)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void MagicPrintLane(Wavefront *w)
void MagicXactCasLd(Wavefront *w)
void MagicReduction(Wavefront *w)
void MagicJoinWFBar(Wavefront *w)
void MagicAtomicNRAddGlobalU32Reg(Wavefront *w, GPUDynInstPtr gpuDynInst)
uint32_t outstandingReqsWrGm
void MagicPrintWFFloat(Wavefront *w)
VectorMask execMask() const
void issueRequest(GPUDynInstPtr gpuDynInst)
issues a request to the pipeline - i.e., enqueue it in the request buffer.
OperandType get(Wavefront *w, int lane, int arg_idx)
void MagicPrintLane64(Wavefront *w)
void MagicMostSigThread(Wavefront *w)
const std::string & disassemble()
void MagicPrefixSum(Wavefront *w)
void MagicAtomicNRAddGroupU32Reg(Wavefront *w, GPUDynInstPtr gpuDynInst)
static const Enums::MemType memType
void set(Wavefront *w, int lane, OperandType val)