0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 16:18:37 +03:00

broken tests

This commit is contained in:
bird_egop
2025-04-13 20:20:51 +03:00
parent 89b2b32cd6
commit 59df064ca4
5 changed files with 119 additions and 57 deletions

View File

@ -71,7 +71,18 @@ public class XorImmWithRm16SignExtendedHandler : InstructionHandler
short imm16 = (sbyte)Decoder.ReadByte();
// Format the immediate value
string immStr = $"0x{(ushort)imm16:X4}";
// For 16-bit operations, we want to show the immediate value without leading zeros
string immStr;
if (imm16 < 0)
{
// For negative values, show the full sign-extended 16-bit value
immStr = $"0x{(ushort)imm16:X}";
}
else
{
// For positive values, show without leading zeros
immStr = $"0x{imm16:X}";
}
// Set the operands
instruction.Operands = $"{destOperand}, {immStr}";