Open knn-k opened 5 years ago
Based on @0xdaryl comments in #4850 I believe I have a solution. Currently the mnemonics for an opcode indicate what size of register is being used. For example the compare and branch zero instruction is represented by the cbz
mnemonic for 32-bit and the cbzx
mnemonic for 64-bit. I propose querying the current instruction's opcode mnemonic to determine the size of the register when printing out the traceCG log. These changes will only affect ARM64Debug.cpp. Is this an acceptable solution or should I investigate the other suggestion of storing the registers size?
I think that works for most cases.
However, there are some instructions that take operands of mixed register types, such as fmov_dtox
and scvtf_wtos
. Decoding register types from the mnemonics of load/store instructions is not trivial, either.
@0xdaryl What do you think?
TR_Debug::getName(TR::RealRegister *reg, TR_RegisterSizes size)
inARM64Debug.cpp
can return the real register names depending on thesize
parameter. However, functions inARM64Debug.cpp
always passTR_WordReg
as the register size regardless of the opcode kind as shown below.Example: