0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 08:18:36 +03:00

more cleanup

This commit is contained in:
bird_egop
2025-04-15 02:42:47 +03:00
parent 49f1d7d221
commit abe4d38d4b
97 changed files with 160 additions and 219 deletions

View File

@ -36,8 +36,7 @@ public class TestImmWithRm8Handler : InstructionHandler
}
// Check if the reg field is 0 (TEST operation)
byte modRM = Decoder.PeakByte();
byte reg = (byte)((modRM & 0x38) >> 3);
var reg = ModRMDecoder.PeakModRMReg();
return reg == 0; // 0 = TEST
}
@ -54,7 +53,7 @@ public class TestImmWithRm8Handler : InstructionHandler
instruction.Type = InstructionType.Test;
// Read the ModR/M byte, specifying that we're dealing with 8-bit operands
var (mod, reg, rm, destinationOperand) = ModRMDecoder.ReadModRM8();
var (_, _, _, destinationOperand) = ModRMDecoder.ReadModRM8();
// Check if we have enough bytes for the immediate value
if (!Decoder.CanReadByte())