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

more cleanup

This commit is contained in:
bird_egop
2025-04-15 02:42:47 +03:00
parent 49f1d7d221
commit abe4d38d4b
97 changed files with 160 additions and 219 deletions

View File

@ -51,7 +51,7 @@ public class MovMemRegHandler : InstructionHandler
// For MOV r/m32, r32 (0x89) or MOV r/m8, r8 (0x88):
// - The r/m field with mod specifies the destination operand (register or memory)
// - The reg field specifies the source register
var (mod, reg, rm, destinationOperand) = ModRMDecoder.ReadModRM();
var (_, reg, _, destinationOperand) = ModRMDecoder.ReadModRM();
// Adjust the operand size based on the opcode
destinationOperand.Size = operandSize;

View File

@ -50,7 +50,7 @@ public class MovRegMemHandler : InstructionHandler
// For MOV r32, r/m32 (0x8B) or MOV r8, r/m8 (0x8A):
// - The reg field specifies the destination register
// - The r/m field with mod specifies the source operand (register or memory)
var (mod, reg, rm, sourceOperand) = ModRMDecoder.ReadModRM();
var (_, reg, _, sourceOperand) = ModRMDecoder.ReadModRM();
// Adjust the operand size based on the opcode
sourceOperand.Size = operandSize;

View File

@ -1,6 +1,6 @@
namespace X86Disassembler.X86.Handlers.Mov;
using X86Disassembler.X86.Operands;
using Operands;
/// <summary>
/// Handler for MOV r/m32, imm32 instruction (0xC7)
@ -38,7 +38,7 @@ public class MovRm32Imm32Handler : InstructionHandler
instruction.Type = InstructionType.Mov;
// Read the ModR/M byte
var (mod, reg, rm, destinationOperand) = ModRMDecoder.ReadModRM();
var (_, reg, _, destinationOperand) = ModRMDecoder.ReadModRM();
// MOV r/m32, imm32 only uses reg=0
if (reg != 0)

View File

@ -47,7 +47,7 @@ public class MovRm8Imm8Handler : InstructionHandler
// For MOV r/m8, imm8 (0xC6):
// - The r/m field with mod specifies the destination operand (register or memory)
// - The immediate value is the source operand
var (mod, reg, rm, destinationOperand) = ModRMDecoder.ReadModRM();
var (_, reg, _, destinationOperand) = ModRMDecoder.ReadModRM();
// MOV r/m8, imm8 only uses reg=0
if (reg != 0)