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

38 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.IL2CPU.X86
{
[OpCode("adc")]
public class AddWithCarry : InstructionWithDestinationAndSourceAndSize
{
public static void InitializeEncodingData(Instruction.InstructionData aData) {
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode=new byte[]{0x10},
NeedsModRMByte=true,
InitialModRMByteValue=0xC0,
DestinationRegAny=true,
SourceRegAny = true,
OperandSizeByte=0,
ReverseRegisters=true
}); // reg to reg
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode=new byte[] {0x12},
NeedsModRMByte=true,
SourceMemory=true,
DestinationRegAny=true,
OperandSizeByte=0
}); // mem to reg
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0x10 },
NeedsModRMByte = true,
DestinationMemory = true,
SourceRegAny = true,
OperandSizeByte = 0,
ReverseRegisters=true
}); // reg to mem
}
}
}