mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-05-19 03:41:18 +03:00
Fix FsubrStiStHandler to correctly use FSUB instruction type for DC E8-EF opcodes
This commit is contained in:
parent
d25e7e8133
commit
7bb14523e5
@ -3,7 +3,7 @@ namespace X86Disassembler.X86.Handlers.FloatingPoint.Arithmetic;
|
||||
using X86Disassembler.X86.Operands;
|
||||
|
||||
/// <summary>
|
||||
/// Handler for FSUBR ST(i), ST instruction (DC E8-EF)
|
||||
/// Handler for FSUB ST(i), ST instruction (DC E8-EF)
|
||||
/// </summary>
|
||||
public class FsubrStiStHandler : InstructionHandler
|
||||
{
|
||||
@ -23,7 +23,7 @@ public class FsubrStiStHandler : InstructionHandler
|
||||
/// <returns>True if this handler can decode the opcode</returns>
|
||||
public override bool CanHandle(byte opcode)
|
||||
{
|
||||
// FSUBR ST(i), ST is DC E8-EF
|
||||
// FSUB ST(i), ST is DC E8-EF
|
||||
if (opcode != 0xDC) return false;
|
||||
|
||||
if (!Decoder.CanReadByte())
|
||||
@ -39,7 +39,7 @@ public class FsubrStiStHandler : InstructionHandler
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decodes a FSUBR ST(i), ST instruction
|
||||
/// Decodes a FSUB 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 FsubrStiStHandler : InstructionHandler
|
||||
var stIndex = (FpuRegisterIndex)(Decoder.ReadByte() - 0xE8);
|
||||
|
||||
// Set the instruction type
|
||||
instruction.Type = InstructionType.Fsubr;
|
||||
instruction.Type = InstructionType.Fsub;
|
||||
|
||||
// Create the FPU register operands
|
||||
var stiOperand = OperandFactory.CreateFPURegisterOperand(stIndex);
|
||||
|
@ -471,9 +471,9 @@ public class InstructionHandlerFactory
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FmulStiStHandler(_decoder)); // FMUL ST(i), ST (DC C8-CF)
|
||||
_handlers.Add(new FloatingPoint.Comparison.FcomRegisterHandler(_decoder)); // FCOM ST(i), ST(0) (DC D0-D7)
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FsubStiStHandler(_decoder)); // FSUB ST(i), ST (DC E0-E7)
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FsubrStiStHandler(_decoder)); // FSUBR ST(i), ST (DC E8-EF)
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FdivrStiStHandler(_decoder)); // FDIV ST(i), ST (DC F0-F7)
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FdivStiStHandler(_decoder)); // FDIVR ST(i), ST (DC F8-FF)
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FsubrStiStHandler(_decoder)); // FSUB ST(i), ST (DC E8-EF)
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FdivrStiStHandler(_decoder)); // FDIVR ST(i), ST (DC F0-F7)
|
||||
_handlers.Add(new FloatingPoint.Arithmetic.FdivStiStHandler(_decoder)); // FDIV ST(i), ST (DC F8-FF)
|
||||
_handlers.Add(new FloatingPoint.Comparison.FcompRegisterHandler(_decoder)); // FCOMP ST(i), ST(0) (DC D8-DF)
|
||||
|
||||
// DD opcode handlers (register operations)
|
||||
|
Loading…
x
Reference in New Issue
Block a user