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

33 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.IL2CPU.X86 {
[OpCode("inc")]
public class Inc : InstructionWithDestinationAndSize {
public static void InitializeEncodingData(Instruction.InstructionData aData) {
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode=new byte[] {0x40},
DestinationRegAny=true,
DestinationRegByte=0,
AllowedSizes = InstructionSizes.DWord | InstructionSizes.Word
}); // reg (alt)
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xFE },
DestinationRegAny = true,
NeedsModRMByte=true,
InitialModRMByteValue=0xC0,
ReverseRegisters=true,
OperandSizeByte=0
}); // reg
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xFE },
DestinationMemory=true,
NeedsModRMByte = true,
ReverseRegisters = true,
OperandSizeByte = 0
}); // memory
}
}
}