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

@ -58,6 +58,23 @@ public class XorImmWithRm8Handler : InstructionHandler
// Read the ModR/M byte
var (mod, reg, rm, destOperand) = ModRMDecoder.ReadModRM();
// Advance past the ModR/M byte
Decoder.SetPosition(position + 1);
// If mod == 3, then the r/m field specifies a register
if (mod == 3)
{
// Get the r/m register name (8-bit)
destOperand = ModRMDecoder.GetRegisterName(rm, 8);
}
else
{
// For memory operands, use the ModRMDecoder to get the full operand string
// Replace "dword ptr" with "byte ptr" to indicate 8-bit operation
destOperand = destOperand.Replace("dword ptr", "byte ptr");
}
// Get the updated position after ModR/M decoding
position = Decoder.GetPosition();