Cosmos/source/Indy.IL2CPU/Assembler/x86/Multiply.cs
mterwoord_cp a9191f40a9
2008-12-25 11:17:03 +00:00

30 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Indy.IL2CPU.Assembler.X86 {
[OpCode("mul")]
public class Multiply: InstructionWithDestinationAndSize {
public static void InitializeEncodingData(Instruction.InstructionData aData) {
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xF6 },
NeedsModRMByte = true,
InitialModRMByteValue = 0xE0,
DestinationReg = Guid.Empty,
OperandSizeByte=0,
ReverseRegisters=true,
DefaultSize=InstructionSize.Byte
}); // EAX with register
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xF6 },
NeedsModRMByte = true,
InitialModRMByteValue = 0x20,
OperandSizeByte = 0,
DestinationMemory = true,
ReverseRegisters=true,
DefaultSize = InstructionSize.Byte
}); // EAX with register
}
}
}