mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 00:18:02 +03:00
Unified ADC accumulator handlers into a single handler
This commit is contained in:
@ -46,7 +46,7 @@ public class SubAlImm8Handler : InstructionHandler
|
||||
instruction.Type = InstructionType.Sub;
|
||||
|
||||
// Create the destination register operand (AL)
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand(RegisterIndex.A, 8);
|
||||
var destinationOperand = OperandFactory.CreateRegisterOperand8(RegisterIndex8.AL);
|
||||
|
||||
// Create the source immediate operand
|
||||
var sourceOperand = OperandFactory.CreateImmediateOperand(imm8, 8);
|
||||
|
@ -23,7 +23,9 @@ public class SubR32Rm32Handler : InstructionHandler
|
||||
/// <returns>True if this handler can decode the opcode</returns>
|
||||
public override bool CanHandle(byte opcode)
|
||||
{
|
||||
return opcode == 0x2B;
|
||||
// Only handle opcode 0x2B when the operand size prefix is NOT present
|
||||
// This ensures 16-bit handlers get priority when the prefix is present
|
||||
return opcode == 0x2B && !Decoder.HasOperandSizePrefix();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -23,7 +23,9 @@ public class SubRm32R32Handler : InstructionHandler
|
||||
/// <returns>True if this handler can decode the opcode</returns>
|
||||
public override bool CanHandle(byte opcode)
|
||||
{
|
||||
return opcode == 0x29;
|
||||
// Only handle opcode 0x29 when the operand size prefix is NOT present
|
||||
// This ensures 16-bit handlers get priority when the prefix is present
|
||||
return opcode == 0x29 && !Decoder.HasOperandSizePrefix();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Reference in New Issue
Block a user