mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
Updated instruction handlers to use factory methods instead of directly setting Size property
This commit is contained in:
@ -43,14 +43,13 @@ public class SubR16Rm16Handler : InstructionHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
// Read the ModR/M byte
|
||||
var (_, reg, _, sourceOperand) = ModRMDecoder.ReadModRM();
|
||||
// Read the ModR/M byte, specifying that we're dealing with 16-bit operands
|
||||
var (_, reg, _, sourceOperand) = ModRMDecoder.ReadModRM16();
|
||||
|
||||
// Ensure the source operand has the correct size (16-bit)
|
||||
sourceOperand.Size = 16;
|
||||
// Note: The operand size is already set to 16-bit by the ReadModRM16 method
|
||||
|
||||
// Create the destination register operand (16-bit)
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand((RegisterIndex)reg, 16);
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand(reg, 16);
|
||||
|
||||
// Set the structured operands
|
||||
instruction.StructuredOperands =
|
||||
|
Reference in New Issue
Block a user