mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
28 lines
No EOL
1.1 KiB
C#
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
|
|
}
|
|
}
|
|
|
|
} |