mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-03 06:40:23 +00:00
26 lines
573 B
C#
26 lines
573 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.IO;
|
|
|
|
namespace Lost.JIT.AMD64
|
|
{
|
|
[Serializable]
|
|
public abstract class ProcessorInstruction
|
|
{
|
|
public const byte OperandSizeOverride = 0x66;
|
|
public const byte AddressSizeOverride = 0x67;
|
|
|
|
public abstract int? Size { get; }
|
|
public abstract void Compile(Stream destStream);
|
|
|
|
public static byte ModRM(int ext, Registers dest)
|
|
{
|
|
int result = 0xC0;
|
|
result += ext << 3;
|
|
result += dest.GetIndex();
|
|
return (byte)result;
|
|
}
|
|
}
|
|
}
|