mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-08-03 18:06:33 +03:00
Fixed several instruction handling issues: 1) Added proper handling for zero displacements in memory operands, 2) Fixed large unsigned displacement values display, 3) Added CmpEaxImmHandler for CMP EAX, imm32 instruction, 4) Fixed JP and JNP conditional jump instruction types
This commit is contained in:
@@ -33,9 +33,9 @@ public class CmpInstructionHandlerTests
|
||||
|
||||
// Check the first operand (AL)
|
||||
var alOperand = instruction.StructuredOperands[0];
|
||||
Assert.IsType<RegisterOperand>(alOperand);
|
||||
var registerOperand = (RegisterOperand)alOperand;
|
||||
Assert.Equal(RegisterIndex.A, registerOperand.Register);
|
||||
Assert.IsType<Register8Operand>(alOperand);
|
||||
var registerOperand = (Register8Operand)alOperand;
|
||||
Assert.Equal(RegisterIndex8.AL, registerOperand.Register);
|
||||
Assert.Equal(8, registerOperand.Size); // Validate that it's an 8-bit register (AL)
|
||||
|
||||
// Check the second operand (immediate value)
|
||||
@@ -70,9 +70,9 @@ public class CmpInstructionHandlerTests
|
||||
|
||||
// Check the first operand (AL)
|
||||
var alOperand = instruction.StructuredOperands[0];
|
||||
Assert.IsType<RegisterOperand>(alOperand);
|
||||
var registerOperand = (RegisterOperand)alOperand;
|
||||
Assert.Equal(RegisterIndex.A, registerOperand.Register);
|
||||
Assert.IsType<Register8Operand>(alOperand);
|
||||
var registerOperand = (Register8Operand)alOperand;
|
||||
Assert.Equal(RegisterIndex8.AL, registerOperand.Register);
|
||||
Assert.Equal(8, registerOperand.Size); // Validate that it's an 8-bit register (AL)
|
||||
|
||||
// Check the second operand (immediate value)
|
||||
|
Reference in New Issue
Block a user