[+] Added WriteOperands(register, register, destStream)

This commit is contained in:
LostTheBlack_cp 2008-04-11 11:45:00 +00:00
parent 9897e9695d
commit 256bbafc8e

View file

@ -233,9 +233,13 @@ namespace Lost.JIT.AMD64
throw new NotImplementedException();
}
public static void WriteOperand(int opcode_ext, Registers register, Stream destStream)
public static void WriteOperand(int opcode_ext, Registers rm, Stream destStream)
{
destStream.WriteByte(ModRM(3, opcode_ext, register.GetIndex()));
destStream.WriteByte(ModRM(3, opcode_ext, rm.GetIndex()));
}
public static void WriteOperands(Registers dest, Registers source, Stream destStream)
{
destStream.WriteByte(ModRM(3, dest, source));
}
static byte Binary(int value)
{