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

tests and handler fixes

This commit is contained in:
bird_egop
2025-04-18 12:49:10 +03:00
parent 4cb20cf741
commit cfef24f72d
16 changed files with 176 additions and 107 deletions

View File

@ -3,15 +3,15 @@ namespace X86Disassembler.X86.Handlers.FloatingPoint.Arithmetic;
using X86Disassembler.X86.Operands;
/// <summary>
/// Handler for FDIVP ST(i), ST instruction (DE F0-F7)
/// Handler for FDIVRP ST(i), ST instruction (DE F0-F7)
/// </summary>
public class FdivpStiStHandler_FDIVRPStiSt : InstructionHandler
public class FdivrpStiStHandler : InstructionHandler
{
/// <summary>
/// Initializes a new instance of the FdivpStiStHandler class
/// </summary>
/// <param name="decoder">The instruction decoder that owns this handler</param>
public FdivpStiStHandler_FDIVRPStiSt(InstructionDecoder decoder)
public FdivrpStiStHandler(InstructionDecoder decoder)
: base(decoder)
{
}
@ -23,7 +23,7 @@ public class FdivpStiStHandler_FDIVRPStiSt : InstructionHandler
/// <returns>True if this handler can decode the opcode</returns>
public override bool CanHandle(byte opcode)
{
// FDIVP ST(i), ST is DE F0-F7
// FDIVRP ST(i), ST is DE F0-F7
if (opcode != 0xDE) return false;
if (!Decoder.CanReadByte())
@ -39,7 +39,7 @@ public class FdivpStiStHandler_FDIVRPStiSt : InstructionHandler
}
/// <summary>
/// Decodes a FDIVP ST(i), ST instruction
/// Decodes a FDIVRP ST(i), ST instruction
/// </summary>
/// <param name="opcode">The opcode of the instruction</param>
/// <param name="instruction">The instruction object to populate</param>
@ -55,7 +55,7 @@ public class FdivpStiStHandler_FDIVRPStiSt : InstructionHandler
var stIndex = (FpuRegisterIndex)(Decoder.ReadByte() - 0xF0);
// Set the instruction type
instruction.Type = InstructionType.Fdivp;
instruction.Type = InstructionType.Fdivrp;
// Create the FPU register operands
var stiOperand = OperandFactory.CreateFPURegisterOperand(stIndex);