mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
fixes and removed unused code
This commit is contained in:
@ -48,7 +48,7 @@ public class AddAlImmHandler : InstructionHandler
|
||||
byte imm8 = Decoder.ReadByte();
|
||||
|
||||
// Create the destination register operand (AL)
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand(RegisterIndex.A, 8);
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand8(RegisterIndex8.AL);
|
||||
|
||||
// Create the source immediate operand
|
||||
var sourceOperand = OperandFactory.CreateImmediateOperand(imm8);
|
||||
|
@ -46,8 +46,8 @@ public class AddEaxImmHandler : InstructionHandler
|
||||
|
||||
instruction.StructuredOperands =
|
||||
[
|
||||
OperandFactory.CreateRegisterOperand(RegisterIndex.A, 32),
|
||||
OperandFactory.CreateImmediateOperand(imm32, 32)
|
||||
OperandFactory.CreateRegisterOperand(RegisterIndex.A),
|
||||
OperandFactory.CreateImmediateOperand(imm32)
|
||||
];
|
||||
|
||||
return true;
|
||||
|
@ -65,7 +65,7 @@ public class AddImmToRm32Handler : InstructionHandler
|
||||
|
||||
instruction.StructuredOperands = [
|
||||
destOperand,
|
||||
OperandFactory.CreateImmediateOperand(imm, 32)
|
||||
OperandFactory.CreateImmediateOperand(imm)
|
||||
];
|
||||
|
||||
return true;
|
||||
|
@ -50,7 +50,7 @@ public class AddR32Rm32Handler : InstructionHandler
|
||||
var (_, reg, _, sourceOperand) = ModRMDecoder.ReadModRM();
|
||||
|
||||
// Create the destination register operand from the reg field
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand(reg, 32);
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand(reg);
|
||||
|
||||
// Set the structured operands
|
||||
instruction.StructuredOperands =
|
||||
|
@ -50,7 +50,7 @@ public class AddRm32R32Handler : InstructionHandler
|
||||
var (_, reg, _, destinationOperand) = ModRMDecoder.ReadModRM();
|
||||
|
||||
// Create the source register operand from the reg field
|
||||
var sourceOperand = OperandFactory.CreateRegisterOperand(reg, 32);
|
||||
var sourceOperand = OperandFactory.CreateRegisterOperand(reg);
|
||||
|
||||
// Set the structured operands
|
||||
instruction.StructuredOperands =
|
||||
|
Reference in New Issue
Block a user