void
Inst_SOPK__S_MOVK_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
sdst = simm16;
void
Inst_SOPK__S_CMOVK_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ScalarOperandI32 sdst(gpuDynInst, instData.SDST);
ConstScalarOperandU32 scc(gpuDynInst, REG_SCC);
void
Inst_SOPK__S_CMPK_EQ_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
ScalarOperandU32 scc(gpuDynInst, REG_SCC);
void
Inst_SOPK__S_CMPK_LG_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
ScalarOperandU32 scc(gpuDynInst, REG_SCC);
void
Inst_SOPK__S_CMPK_GT_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
ScalarOperandU32 scc(gpuDynInst, REG_SCC);
void
Inst_SOPK__S_CMPK_GE_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
ScalarOperandU32 scc(gpuDynInst, REG_SCC);
void
Inst_SOPK__S_CMPK_LT_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
ScalarOperandU32 scc(gpuDynInst, REG_SCC);
void
Inst_SOPK__S_CMPK_LE_I32::execute(GPUDynInstPtr gpuDynInst)
{
- ScalarRegI32 simm16 = (ScalarRegI32)instData.SIMM16;
+ ScalarRegI32 simm16 = (ScalarRegI32)sext<16>(instData.SIMM16);
ConstScalarOperandI32 src(gpuDynInst, instData.SDST);
ScalarOperandU32 scc(gpuDynInst, REG_SCC);
src.read();
- sdst = src.rawData() + (ScalarRegI32)simm16;
+ sdst = src.rawData() + (ScalarRegI32)sext<16>(simm16);
scc = (bits(src.rawData(), 31) == bits(simm16, 15)
&& bits(src.rawData(), 31) != bits(sdst.rawData(), 31)) ? 1 : 0;
sdst.read();
- sdst = sdst.rawData() * (ScalarRegI32)simm16;
+ sdst = sdst.rawData() * (ScalarRegI32)sext<16>(simm16);
sdst.write();
}
Addr pc = wf->pc();
ScalarRegI16 simm16 = instData.SIMM16;
- pc = pc + ((ScalarRegI64)simm16 * 4LL) + 4LL;
+ pc = pc + ((ScalarRegI64)sext<16>(simm16 * 4LL)) + 4LL;
wf->pc(pc);
}
scc.read();
if (!scc.rawData()) {
- pc = pc + ((ScalarRegI64)simm16 * 4LL) + 4LL;
+ pc = pc + ((ScalarRegI64)sext<16>(simm16 * 4LL)) + 4LL;
}
wf->pc(pc);
scc.read();
if (scc.rawData()) {
- pc = pc + ((ScalarRegI64)simm16 * 4LL) + 4LL;
+ pc = pc + ((ScalarRegI64)sext<16>(simm16 * 4LL)) + 4LL;
}
wf->pc(pc);
vcc.read();
if (!vcc.rawData()) {
- pc = pc + ((ScalarRegI64)simm16 * 4LL) + 4LL;
+ pc = pc + ((ScalarRegI64)sext<16>(simm16 * 4LL)) + 4LL;
}
wf->pc(pc);
if (vcc.rawData()) {
Addr pc = wf->pc();
ScalarRegI16 simm16 = instData.SIMM16;
- pc = pc + ((ScalarRegI64)simm16 * 4LL) + 4LL;
+ pc = pc + ((ScalarRegI64)sext<16>(simm16 * 4LL)) + 4LL;
wf->pc(pc);
}
}
if (wf->execMask().none()) {
Addr pc = wf->pc();
ScalarRegI16 simm16 = instData.SIMM16;
- pc = pc + ((ScalarRegI64)simm16 * 4LL) + 4LL;
+ pc = pc + ((ScalarRegI64)sext<16>(simm16 * 4LL)) + 4LL;
wf->pc(pc);
}
}
if (wf->execMask().any()) {
Addr pc = wf->pc();
ScalarRegI16 simm16 = instData.SIMM16;
- pc = pc + ((ScalarRegI64)simm16 * 4LL) + 4LL;
+ pc = pc + ((ScalarRegI64)sext<16>(simm16 * 4LL)) + 4LL;
wf->pc(pc);
}
}