mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
more cleanup
This commit is contained in:
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user