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

52 lines
No EOL
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.IL2CPU.X86 {
[OpCode("shl")]
public class ShiftLeft: InstructionWithDestinationAndSourceAndSize {
public static void InitializeEncodingData(Instruction.InstructionData aData) {
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xD2},
NeedsModRMByte=true,
InitialModRMByteValue = 0xE0,
OperandSizeByte=0,
ReverseRegisters = true,
DestinationRegAny=true,
SourceReg=Registers.CL,
SourceRegByte=-1
}); // register by CL
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xD2 },
NeedsModRMByte = true,
InitialModRMByteValue = 0x20,
ReverseRegisters = true,
OperandSizeByte = 0,
DestinationMemory = true,
SourceReg = Registers.CL,
SourceRegByte = -1
}); // memory by CL
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xC0 },
NeedsModRMByte = true,
InitialModRMByteValue = 0xE0,
OperandSizeByte = 0,
DestinationRegAny = true,
ReverseRegisters = true,
SourceImmediate=true,
SourceImmediateSize=InstructionSize.Byte
}); // register by immediate
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xC0 },
NeedsModRMByte = true,
InitialModRMByteValue = 0x20,
OperandSizeByte = 0,
ReverseRegisters=true,
DestinationMemory = true,
SourceImmediate = true,
SourceImmediateSize = InstructionSize.Byte
}); // memory by immediate
}
}
}