Пример #1
0
static void _imul_ImmStyle( const xRegisterInt& param1, const SrcType& param2, int imm )
{
	// for iMul OpSize is allowed to be 16 or 32 bit only.
	const uint OpSize = param1.GetOperandSize();

	pxAssert( OpSize == param2.GetOperandSize() );
	pxAssert( OpSize > 1 );

	xOpWrite0F( (OpSize == 2) ? 0x66 : 0, is_s8( imm ) ? 0x6b : 0x69, param1, param2 );

	if( is_s8( imm ) )
		xWrite8( (u8)imm );
	else
		param1.xWriteImm( imm );
}
Пример #2
0
void xImpl_DwordShift::operator()( const xIndirectVoid& dest, const xRegister16or32& from, u8 shiftcnt ) const
{
	if( shiftcnt != 0 )
		xOpWrite0F( (from->GetOperandSize() == 2) ? 0x66 : 0x00, OpcodeBase, from, dest, shiftcnt );
}
Пример #3
0
void xImpl_DwordShift::operator()( const xRegister16& to,	const xRegister16& from, u8 shiftcnt ) const
{
	if( shiftcnt != 0 )
		xOpWrite0F( 0x66, OpcodeBase, to, from, shiftcnt );
}
Пример #4
0
void xImpl_DwordShift::operator()( const xIndirectVoid& dest, const xRegister16or32& from, const xRegisterCL& /* clreg */ ) const
{
	xOpWrite0F( (from->GetOperandSize() == 2) ? 0x66 : 0x00, OpcodeBase + 1, from, dest );
}
Пример #5
0
void xImpl_Group8::operator()( const xRegister16or32& bitbase, u8 bitoffset ) const
{
	xOpWrite0F( (bitbase->GetOperandSize() == 2) ? 0x66 : 0x00, 0xba, InstType, bitbase, bitoffset );
}
Пример #6
0
void xImpl_BitScan::operator()( const xRegister16or32or64& to, const xIndirectVoid& sibsrc ) const
{
	xOpWrite0F( to->GetPrefix16(), Opcode, to, sibsrc );
}
Пример #7
0
void xImpl_BitScan::operator()( const xRegister32& to, const xRegister32& from ) const		{ xOpWrite0F( Opcode, to, from ); }
Пример #8
0
void xImpl_Group8::operator()( const xRegister16& bitbase, const xRegister16& bitoffset ) const	{ xOpWrite0F( 0x66, 0xa3 | (InstType << 3), bitbase, bitoffset ); }
Пример #9
0
void xImpl_DwordShift::operator()( const xIndirectVoid& dest, const xRegister16or32or64& from, u8 shiftcnt ) const
{
	if( shiftcnt != 0 )
		xOpWrite0F( from->GetPrefix16(), OpcodeBase, from, dest, shiftcnt );
}
Пример #10
0
__emitinline void xOpWrite0F( u16 opcode, int instId, const xIndirectVoid& sib )
{
	xOpWrite0F( 0, opcode, instId, sib );
}
Пример #11
0
void xImpl_DwordShift::operator()( const xIndirectVoid& dest, const xRegister16or32or64& from, const xRegisterCL& /* clreg */ ) const
{
	xOpWrite0F( from->GetPrefix16(), OpcodeBase + 1, from, dest );
}
Пример #12
0
void xImpl_DwordShift::operator()( const xRegister16or32or64& to,	const xRegister16or32or64& from, u8 shiftcnt ) const
{
	pxAssert( to->GetOperandSize() == from->GetOperandSize() );
	if( shiftcnt != 0 )
		xOpWrite0F( from->GetPrefix16(), OpcodeBase, to, from, shiftcnt );
}
Пример #13
0
void xImpl_DwordShift::operator()( const xRegister16or32or64& to,	const xRegister16or32or64& from, const xRegisterCL& /* clreg */ ) const	{
	pxAssert( to->GetOperandSize() == from->GetOperandSize() );
	xOpWrite0F( from->GetPrefix16(), OpcodeBase+1, to, from );
}
Пример #14
0
void xImpl_iMul::operator()( const xRegister16& to,	const xRegister16& from ) const			{ xOpWrite0F( 0x66, 0xaf, to, from ); }
Пример #15
0
void xImpl_BitScan::operator()( const xRegister16& to, const xRegister16& from ) const		{ xOpWrite0F( 0x66, Opcode, to, from ); }
Пример #16
0
void xImpl_iMul::operator()( const xRegister16& to,	const xIndirectVoid& src ) const			{ xOpWrite0F( 0x66, 0xaf, to, src ); }
Пример #17
0
void xImpl_BitScan::operator()( const xRegister16or32& to, const xIndirectVoid& sibsrc ) const
{
	xOpWrite0F( (to->GetOperandSize() == 2) ? 0x66 : 0x00, Opcode, to, sibsrc );
}
Пример #18
0
void xImpl_Group8::operator()( const xIndirect16& bitbase, u8 bitoffset ) const					{ xOpWrite0F( 0x66, 0xba, InstType, bitbase, bitoffset ); }
Пример #19
0
void xImpl_DwordShift::operator()( const xRegister16& to,	const xRegister16& from, const xRegisterCL& /* clreg */ ) const	{ xOpWrite0F( 0x66, OpcodeBase+1, to, from ); }
Пример #20
0
void xImpl_Group8::operator()( const xIndirectVoid& bitbase, const xRegister16or32& bitoffset ) const
{
	xOpWrite0F( (bitoffset->GetOperandSize() == 2) ? 0x66 : 0x00, 0xa3 | (InstType << 3), bitoffset, bitbase );
}
Пример #21
0
void xImpl_BitScan::operator()( const xRegister16or32or64& to, const xRegister16or32or64& from ) const {
	pxAssert( to->GetOperandSize() == from->GetOperandSize() );
	xOpWrite0F( from->GetPrefix16(), Opcode, to, from );
}