mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-20 16:18:37 +03:00
more cleanup
This commit is contained in:
@ -34,12 +34,8 @@ public class PushRm32Handler : InstructionHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Peek at the ModR/M byte without advancing the position
|
||||
byte modRM = Decoder.PeakByte();
|
||||
|
||||
// Extract the reg field (bits 3-5)
|
||||
byte reg = (byte)((modRM & 0x38) >> 3);
|
||||
|
||||
var reg = ModRMDecoder.PeakModRMReg();
|
||||
|
||||
// PUSH r/m32 is encoded as FF /6 (reg field = 6)
|
||||
return reg == 6;
|
||||
@ -65,7 +61,7 @@ public class PushRm32Handler : InstructionHandler
|
||||
// Read the ModR/M byte
|
||||
// For PUSH r/m32 (FF /6):
|
||||
// - The r/m field with mod specifies the operand (register or memory)
|
||||
var (mod, reg, rm, operand) = ModRMDecoder.ReadModRM();
|
||||
var (_, _, _, operand) = ModRMDecoder.ReadModRM();
|
||||
|
||||
// Set the structured operands
|
||||
// PUSH has only one operand
|
||||
|
Reference in New Issue
Block a user