mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 08:18:36 +03:00
Fixes to tests and ModRM + SIB
This commit is contained in:
@ -43,7 +43,6 @@ public class InstructionDecoder
|
||||
|
||||
// Create specialized decoders
|
||||
_prefixDecoder = new PrefixDecoder();
|
||||
new ModRMDecoder(this);
|
||||
|
||||
// Create the instruction handler factory
|
||||
_handlerFactory = new InstructionHandlerFactory(_codeBuffer, this, _length);
|
||||
@ -101,7 +100,7 @@ public class InstructionDecoder
|
||||
|
||||
Printer.WriteLine?.Invoke($"Resolved handler {handler?.GetType().Name}");
|
||||
|
||||
bool handlerSuccess = false;
|
||||
bool handlerSuccess;
|
||||
|
||||
// Try to decode with a handler first
|
||||
if (handler != null)
|
||||
@ -115,6 +114,11 @@ public class InstructionDecoder
|
||||
// Decode the instruction
|
||||
handlerSuccess = handler.Decode(opcode, instruction);
|
||||
|
||||
if (!handlerSuccess)
|
||||
{
|
||||
Printer.WriteLine?.Invoke($"Handler {handler.GetType().Name} failed!");
|
||||
}
|
||||
|
||||
// Apply segment override prefix to the structured operands if needed
|
||||
if (handlerSuccess && hasSegmentOverride)
|
||||
{
|
||||
|
Reference in New Issue
Block a user