Skip to content

Commit

Permalink
Return accurate size of addressing mode dsp/dsp+cnst instr descriptor (
Browse files Browse the repository at this point in the history
…#47284)

* return accurate size for amd dsp and amd dsp+cnst

* fix the condition
  • Loading branch information
kunalspathak authored Jan 25, 2021
1 parent e42de0e commit 1a25256
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/coreclr/jit/emitxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7416,8 +7416,6 @@ size_t emitter::emitSizeOfInsDsc(instrDesc* id)
case ID_OP_CNS:
case ID_OP_DSP:
case ID_OP_DSP_CNS:
case ID_OP_AMD:
case ID_OP_AMD_CNS:
if (id->idIsLargeCns())
{
if (id->idIsLargeDsp())
Expand All @@ -7440,6 +7438,30 @@ size_t emitter::emitSizeOfInsDsc(instrDesc* id)
return sizeof(instrDesc);
}
}
case ID_OP_AMD:
case ID_OP_AMD_CNS:
if (id->idIsLargeCns())
{
if (id->idIsLargeDsp())
{
return sizeof(instrDescCnsAmd);
}
else
{
return sizeof(instrDescCns);
}
}
else
{
if (id->idIsLargeDsp())
{
return sizeof(instrDescAmd);
}
else
{
return sizeof(instrDesc);
}
}

default:
NO_WAY("unexpected instruction descriptor format");
Expand Down

0 comments on commit 1a25256

Please sign in to comment.