mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
simplify reading logic
This commit is contained in:
@ -53,14 +53,11 @@ public class AndMemRegHandler : InstructionHandler
|
||||
// For mod == 3, both operands are registers
|
||||
if (mod == 3)
|
||||
{
|
||||
string rmRegName = ModRMDecoder.GetRegisterName(rm, 32);
|
||||
instruction.Operands = $"{rmRegName}, {regName}";
|
||||
memOperand = ModRMDecoder.GetRegisterName(rm, 32);
|
||||
}
|
||||
else // Memory operand
|
||||
{
|
||||
instruction.Operands = $"{memOperand}, {regName}";
|
||||
}
|
||||
|
||||
|
||||
instruction.Operands = $"{memOperand}, {regName}";
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -53,14 +53,11 @@ public class AndR32Rm32Handler : InstructionHandler
|
||||
// For mod == 3, both operands are registers
|
||||
if (mod == 3)
|
||||
{
|
||||
string rmRegName = ModRMDecoder.GetRegisterName(rm, 32);
|
||||
instruction.Operands = $"{regName}, {rmRegName}";
|
||||
memOperand = ModRMDecoder.GetRegisterName(rm, 32);
|
||||
}
|
||||
else // Memory operand
|
||||
{
|
||||
instruction.Operands = $"{regName}, {memOperand}";
|
||||
}
|
||||
|
||||
|
||||
instruction.Operands = $"{regName}, {memOperand}";
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user