0
mirror of https://github.com/sampletext32/ParkanPlayground.git synced 2025-06-20 16:18:37 +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

@ -30,8 +30,7 @@ public class XorImmWithRm16SignExtendedHandler : InstructionHandler
if (!Decoder.CanReadByte())
return false;
byte modRM = Decoder.PeakByte();
byte reg = (byte)((modRM & 0x38) >> 3);
var reg = ModRMDecoder.PeakModRMReg();
return reg == 6; // 6 = XOR
}
@ -56,7 +55,7 @@ public class XorImmWithRm16SignExtendedHandler : InstructionHandler
// For XOR r/m16, imm8 (sign-extended) (0x83 /6 with 0x66 prefix):
// - The r/m field with mod specifies the destination operand (register or memory)
// - The immediate value is the source operand (sign-extended from 8 to 16 bits)
var (mod, reg, rm, destinationOperand) = ModRMDecoder.ReadModRM();
var (_, _, _, destinationOperand) = ModRMDecoder.ReadModRM();
// Adjust the operand size to 16-bit
destinationOperand.Size = 16;