mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 16:18:37 +03:00
Fix x86 disassembler issues with direct memory addressing and immediate value formatting
This commit is contained in:
@ -11,13 +11,13 @@ public class LoadStoreInt16Handler : InstructionHandler
|
||||
private static readonly InstructionType[] MemoryInstructionTypes =
|
||||
[
|
||||
InstructionType.Fild, // fild word ptr [r/m]
|
||||
InstructionType.Unknown, // fistt word ptr [r/m] (not implemented)
|
||||
InstructionType.Fst, // fist word ptr [r/m]
|
||||
InstructionType.Fstp, // fistp word ptr [r/m]
|
||||
InstructionType.Fld, // fbld packed BCD [r/m]
|
||||
InstructionType.Fisttp, // fistt word ptr [r/m]
|
||||
InstructionType.Fist, // fist word ptr [r/m]
|
||||
InstructionType.Fistp, // fistp word ptr [r/m]
|
||||
InstructionType.Fbld, // fbld packed BCD [r/m]
|
||||
InstructionType.Fild, // fild qword ptr [r/m] (64-bit integer)
|
||||
InstructionType.Fst, // fbstp packed BCD [r/m]
|
||||
InstructionType.Fstp // fistp qword ptr [r/m] (64-bit integer)
|
||||
InstructionType.Fbstp, // fbstp packed BCD [r/m]
|
||||
InstructionType.Fistp // fistp qword ptr [r/m] (64-bit integer)
|
||||
];
|
||||
|
||||
// Register-register operations mapping (mod=3)
|
||||
@ -94,13 +94,6 @@ public class LoadStoreInt16Handler : InstructionHandler
|
||||
// Read the ModR/M byte
|
||||
var (mod, reg, rm, memoryOperand) = ModRMDecoder.ReadModRM();
|
||||
|
||||
// Check for FNSTSW AX (DF E0)
|
||||
if (mod == 3 && reg == RegisterIndex.Bp && rm == RegisterIndex.A)
|
||||
{
|
||||
// This is handled by the FnstswHandler, so we should not handle it here
|
||||
return false;
|
||||
}
|
||||
|
||||
// Handle based on addressing mode
|
||||
if (mod != 3) // Memory operand
|
||||
{
|
||||
|
Reference in New Issue
Block a user