Cosmos/source/Indy.IL2CPU/Assembler/x86/ShiftLeft.cs
mterwoord_cp 8b8be0c28d
2008-11-29 17:26:44 +00:00

44 lines
No EOL
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.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,
DestinationReg=Guid.Empty,
SourceReg=Registers.CL
}); // register by CL
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xD2 },
NeedsModRMByte = true,
InitialModRMByteValue = 0x20,
OperandSizeByte = 0,
DestinationMemory=true,
SourceReg = Registers.CL
}); // memory by CL
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xC0 },
NeedsModRMByte = true,
InitialModRMByteValue = 0xE0,
OperandSizeByte = 0,
DestinationReg = Guid.Empty,
SourceImmediate=true
}); // register by immediate
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xC0 },
NeedsModRMByte = true,
InitialModRMByteValue = 0x20,
OperandSizeByte = 0,
DestinationMemory = true,
SourceImmediate = true
}); // memory by immediate
}
}
}