getOperandSize(int opIdx) override
{
switch (opIdx) {
- case 0: //ssrc
- return 8;
- case 1: //sdst
+ case 0: //sdst
return 8;
default:
fatal("op idx %i out of bounds\n", opIdx);
isSrcOperand(int opIdx) override
{
switch (opIdx) {
- case 0: //ssrc
- return true;
- case 1: //sdst
+ case 0: //sdst
return false;
default:
fatal("op idx %i out of bounds\n", opIdx);
isDstOperand(int opIdx) override
{
switch (opIdx) {
- case 0: //ssrc
- return false;
- case 1: //sdst
+ case 0: //sdst
return true;
default:
fatal("op idx %i out of bounds\n", opIdx);
switch (opIdx) {
case 0:
- return isScalarReg(instData.SSRC0);
+ if (instData.OP == 0x1C) {
+ // Special case for s_getpc, which has no source reg.
+ // Instead, it implicitly reads the PC.
+ return isScalarReg(instData.SDST);
+ }
+ return isScalarReg(instData.SSRC0);
case 1:
return isScalarReg(instData.SDST);
default:
switch (opIdx) {
case 0:
+ if (instData.OP == 0x1C) {
+ // Special case for s_getpc, which has no source reg.
+ // Instead, it implicitly reads the PC.
+ return opSelectorToRegIdx(instData.SDST,
+ gpuDynInst->wavefront()->reservedScalarRegs);
+ }
return opSelectorToRegIdx(instData.SSRC0,
gpuDynInst->wavefront()->reservedScalarRegs);
case 1: