mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.IL2CPU.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,
|
|
DestinationRegAny = true,
|
|
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
|
|
}
|
|
}
|
|
}
|