using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cosmos.IL2CPU.X86 { /// /// Represents the JMP opcode /// [OpCode("jmp")] public class Jump: JumpBase { public static void InitializeEncodingData(Instruction.InstructionData aData) { aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption { OpCode = new byte[] { 0xE9 }, DestinationImmediate = true, AllowedSizes=InstructionSizes.DWord }); // direct to immediate aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption { OpCode = new byte[] { 0xFF }, DestinationMemory = true, AllowedSizes = InstructionSizes.DWord, ReverseRegisters = true, NeedsModRMByte=true, InitialModRMByteValue = 0x20 }); // indirect at memory aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption { OpCode = new byte[] { 0xFF }, DestinationRegAny = true, AllowedSizes = InstructionSizes.DWord, ReverseRegisters=true, NeedsModRMByte = true, InitialModRMByteValue = 0xE0 }); // indirect at register } } }