Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/coreclr/jit/emitarm64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12063,22 +12063,25 @@ void emitter::emitDispExtendReg(regNumber reg, insOpts opt, ssize_t imm)
assert(insOptsNone(opt) || insOptsAnyExtend(opt) || (opt == INS_OPTS_LSL));

// size is based on the extend option, not the instr size.
emitAttr size = insOpts32BitExtend(opt) ? EA_4BYTE : EA_8BYTE;
// Assume INS_OPTS_NONE and INS_OPTS_LSL are 64bit as they usually are.
emitAttr size = (insOptsNone(opt) || insOptsLSL(opt) || insOpts64BitExtend(opt)) ? EA_8BYTE : EA_4BYTE;

if (strictArmAsm)
{
if (insOptsNone(opt))
if (insOptsNone(opt) || (insOptsLSL(opt) && imm == 0))
{
emitDispReg(reg, size, false);
}
else
{
emitDispReg(reg, size, true);
if (opt == INS_OPTS_LSL)

if (insOptsLSL(opt))
printf("LSL");
else
emitDispExtendOpts(opt);
if ((imm > 0) || (opt == INS_OPTS_LSL))

if (imm > 0)
{
printf(" ");
emitDispImm(imm, false);
Expand Down
5 changes: 0 additions & 5 deletions src/coreclr/jit/emitarm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,6 @@ inline static bool insOptsLSExtend(insOpts opt)
(opt == INS_OPTS_UXTX) || (opt == INS_OPTS_SXTX));
}

inline static bool insOpts32BitExtend(insOpts opt)
{
return ((opt == INS_OPTS_UXTW) || (opt == INS_OPTS_SXTW));
}

inline static bool insOpts64BitExtend(insOpts opt)
{
return ((opt == INS_OPTS_UXTX) || (opt == INS_OPTS_SXTX));
Expand Down