Cosmos/source2/IL2PCU/Cosmos.IL2CPU.X86/X86/Pop.cs
2009-09-06 16:59:43 +00:00

28 lines
No EOL
1.1 KiB
C#

using System;
using System.Linq;
namespace Cosmos.IL2CPU.X86 {
[OpCode("pop")]
public class Pop: InstructionWithDestinationAndSize{
public static void InitializeEncodingData(Instruction.InstructionData aData) {
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
AllowedSizes = InstructionSizes.DWord | InstructionSizes.Word,
OpCode = new byte[] { 0x58 },
NeedsModRMByte = false,
DestinationRegAny = true,
DefaultSize=InstructionSize.DWord,
ReverseRegisters=true,
DestinationRegByte = 0
}); // pop to register
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
AllowedSizes = InstructionSizes.DWord | InstructionSizes.Word,
OpCode = new byte[]{0x8F},
NeedsModRMByte=true,
DestinationMemory=true,
ReverseRegisters = true,
DefaultSize = InstructionSize.DWord
}); // pop to memory
}
}
}