Skip to content

Commit

Permalink
Fixes #79558: (#79681)
Browse files Browse the repository at this point in the history
INS_movd can represent either movd or movq(#47943).
As such, this is a special case and we need to calculate inputSize based on emitAttr.
  • Loading branch information
DeepakRajendrakumaran authored Dec 16, 2022
1 parent 57b410a commit a72bdd0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/coreclr/jit/emitxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14615,6 +14615,21 @@ BYTE* emitter::emitOutputLJ(insGroup* ig, BYTE* dst, instrDesc* i)
ssize_t emitter::GetInputSizeInBytes(instrDesc* id)
{
insFlags inputSize = static_cast<insFlags>((CodeGenInterface::instInfo[id->idIns()] & Input_Mask));

// INS_movd can represent either movd or movq(https://github.com/dotnet/runtime/issues/47943).
// As such, this is a special case and we need to calculate size based on emitAttr.
if (id->idIns() == INS_movd)
{
if (EA_SIZE(id->idOpSize()) == EA_8BYTE)
{
inputSize = Input_64Bit;
}
else
{
inputSize = Input_32Bit;
}
}

switch (inputSize)
{
case 0:
Expand Down

0 comments on commit a72bdd0

Please sign in to comment.