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

35 lines
No EOL
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Cosmos.IL2CPU.X86 {
[OpCode("call")]
public class Call: JumpBase {
public static void InitializeEncodingData(Instruction.InstructionData aData) {
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xE8 },
DestinationImmediate = true,
AllowedSizes = InstructionSizes.DWord
}); // direct value
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xFF, 0xD0 },
DestinationRegAny = true,
DestinationRegByte=1,
AllowedSizes = InstructionSizes.DWord
}); // register indirect
aData.EncodingOptions.Add(new InstructionData.InstructionEncodingOption {
OpCode = new byte[] { 0xFF },
NeedsModRMByte=true,
InitialModRMByteValue=0x10,
DestinationMemory=true,
ReverseRegisters=true,
AllowedSizes = InstructionSizes.DWord
}); // memory indirect
}
public Call() {
mNear = false;
}
}
}