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

Test fixes

This commit is contained in:
bird_egop
2025-04-16 18:30:17 +03:00
parent d4eb920e2f
commit 6719cff2af
38 changed files with 469 additions and 170 deletions

View File

@ -42,17 +42,17 @@ public class AndRm8R8Handler : InstructionHandler
return false;
}
// Read the ModR/M byte
var (mod, reg, rm, destOperand) = ModRMDecoder.ReadModRM();
// Read the ModR/M byte, specifying that we're dealing with 8-bit operands
var (mod, reg, rm, destOperand) = ModRMDecoder.ReadModRM8();
// Create the source register operand
var srcOperand = OperandFactory.CreateRegisterOperand(reg, 8);
// Create the source register operand using the 8-bit register type
var srcOperand = OperandFactory.CreateRegisterOperand8(reg);
// For mod == 3, both operands are registers
if (mod == 3)
{
// Create a register operand for the r/m field
var rmOperand = OperandFactory.CreateRegisterOperand(rm, 8);
// Create a register operand for the r/m field using the 8-bit register type
var rmOperand = OperandFactory.CreateRegisterOperand8(rm);
// Set the structured operands
instruction.StructuredOperands =
@ -63,11 +63,7 @@ public class AndRm8R8Handler : InstructionHandler
}
else // Memory operand
{
// Ensure memory operand has the correct size (8-bit)
if (destOperand is MemoryOperand memOperand)
{
memOperand.Size = 8;
}
// Note: The operand size is already set to 8-bit by the ReadModRM8 method
// Set the structured operands
instruction.StructuredOperands =