void emitDispClsVar(CORINFO_FIELD_HANDLE fldHnd, ssize_t offs, bool reloc = false);
void emitDispFrameRef(int varx, int disp, int offs, bool asmfm);
void emitDispInsOffs(unsigned offs, bool doffs);
- void emitDispInsHex(BYTE* code, size_t sz);
+ void emitDispInsHex(instrDesc* id, BYTE* code, size_t sz);
#else // !DEBUG
#define emitVarRefOffs 0
* Display (optionally) the instruction encoding in hex
*/
-void emitter::emitDispInsHex(BYTE* code, size_t sz)
+void emitter::emitDispInsHex(instrDesc* id, BYTE* code, size_t sz)
{
// We do not display the instruction hex if we want diff-able disassembly
if (!emitComp->opts.disDiffable)
{
printf(" %04X %04X", (*((unsigned short*)(code + 0))), (*((unsigned short*)(code + 2))));
}
+ else
+ {
+ assert(sz == 0);
+
+ // At least display the encoding size of the instruction, even if not displaying its actual encoding.
+ insSize isz = emitInsSize(id->idInsFmt());
+ switch (isz)
+ {
+ case ISZ_16BIT:
+ printf(" 2B");
+ break;
+ case ISZ_32BIT:
+ printf(" 4B");
+ break;
+ case ISZ_48BIT:
+ printf(" 6B");
+ break;
+ default:
+ unreached();
+ }
+ }
}
}
/* Display the instruction hex code */
- emitDispInsHex(code, sz);
+ emitDispInsHex(id, code, sz);
printf(" ");
* Display (optionally) the instruction encoding in hex
*/
-void emitter::emitDispInsHex(BYTE* code, size_t sz)
+void emitter::emitDispInsHex(instrDesc* id, BYTE* code, size_t sz)
{
// We do not display the instruction hex if we want diff-able disassembly
if (!emitComp->opts.disDiffable)
}
else
{
+ assert(sz == 0);
printf(" ");
}
}
/* Display the instruction hex code */
- emitDispInsHex(pCode, sz);
+ emitDispInsHex(id, pCode, sz);
printf(" ");
* Display (optionally) the bytes for the instruction encoding in hex
*/
-void emitter::emitDispInsHex(BYTE* code, size_t sz)
+void emitter::emitDispInsHex(instrDesc* id, BYTE* code, size_t sz)
{
// We do not display the instruction hex if we want diff-able disassembly
if (!emitComp->opts.disDiffable)
{
/* Display the instruction hex code */
- emitDispInsHex(code, sz);
+ emitDispInsHex(id, code, sz);
}
/* Display the instruction name */