CMOVL() public method

CMOVL reg16,rmreg16
public CMOVL ( R16Type target, R16Type source ) : void
target R16Type
source R16Type
return void
Example #1
0
	public void CMOVL_reg32_rmreg32 ()
	{
		// CMOVL EDX, EAX
		// CMOVL (R32.EDX, R32.EAX)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMOVL (R32.EDX, R32.EAX);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0xf, 0x4c, 0xd0 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMOVL EDX, EAX' failed.");
	}
Example #2
0
	public void CMOVL_reg32_mem32 ()
	{
		// CMOVL EDX, [0x12345678]
		// CMOVL (R32.EDX, new DWordMemory(null, null, null, 0, 0x12345678))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMOVL (R32.EDX, new DWordMemory (null, null, null, 0, 0x12345678));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0xf, 0x4c, 0x15, 0x78, 0x56, 0x34, 0x12 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMOVL EDX, [0x12345678]' failed.");
	}
Example #3
0
	public void CMOVL_reg16_rmreg16 ()
	{
		// CMOVL BX, BP
		// CMOVL (R16.BX, R16.BP)
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMOVL (R16.BX, R16.BP);
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xf, 0x4c, 0xdd };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMOVL BX, BP' failed.");
	}
Example #4
0
	public void CMOVL_reg16_mem16 ()
	{
		// CMOVL DX, [ECX + EDX*8]
		// CMOVL (R16.DX, new WordMemory(null, R32.ECX, R32.EDX, 3))
		MemoryStream memoryStream = new MemoryStream ();
		Assembly asm = new Assembly ();
		asm.CMOVL (R16.DX, new WordMemory (null, R32.ECX, R32.EDX, 3));
		asm.Encode (memoryStream);
		byte [] target = new byte [] { 0x66, 0xf, 0x4c, 0x14, 0xd1 };
		Assert.IsTrue (CompareData (memoryStream, target), "'CMOVL DX, [ECX + EDX*8]' failed.");
	}