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

Fixed floating point handlers for qword operands and added missing FCOM ST(0), ST(i) handler

This commit is contained in:
bird_egop
2025-04-18 00:44:57 +03:00
parent e6e3e886c8
commit 66f9e838ad
12 changed files with 156 additions and 38 deletions

View File

@ -51,8 +51,8 @@ public class FaddFloat64Handler : InstructionHandler
return false;
}
// Read the ModR/M byte using the specialized FPU method
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu();
// Read the ModR/M byte using the specialized FPU method for 64-bit operands
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu64();
// Verify reg field is 0 (FADD)
if (reg != 0)

View File

@ -52,7 +52,7 @@ public class FdivFloat64Handler : InstructionHandler
}
// Read the ModR/M byte using the specialized FPU method
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu();
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu64();
// Set the instruction type
instruction.Type = InstructionType.Fdiv;

View File

@ -52,7 +52,7 @@ public class FdivrFloat64Handler : InstructionHandler
}
// Read the ModR/M byte using the specialized FPU method
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu();
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu64();
// Set the instruction type
instruction.Type = InstructionType.Fdivr;

View File

@ -51,8 +51,8 @@ public class FmulFloat64Handler : InstructionHandler
return false;
}
// Read the ModR/M byte using the specialized FPU method
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu();
// Read the ModR/M byte using the specialized FPU method for 64-bit operands
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu64();
// Set the instruction type
instruction.Type = InstructionType.Fmul;

View File

@ -52,7 +52,7 @@ public class FsubFloat64Handler : InstructionHandler
}
// Read the ModR/M byte using the specialized FPU method
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu();
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu64();
// Set the instruction type
instruction.Type = InstructionType.Fsub;

View File

@ -52,7 +52,7 @@ public class FsubrFloat64Handler : InstructionHandler
}
// Read the ModR/M byte using the specialized FPU method
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu();
var (mod, reg, fpuRm, rawOperand) = ModRMDecoder.ReadModRMFpu64();
// Set the instruction type
instruction.Type = InstructionType.Fsubr;