Example #1
0
void xImpl_Test::operator()( const xRegisterInt& to, int imm ) const
{
	if( to.IsAccumulator() ) {
		xOpAccWrite( to.GetPrefix16(), to.Is8BitOp() ? 0xa8 : 0xa9, 0, to );
	} else {
		xOpWrite( to.GetPrefix16(), to.Is8BitOp() ? 0xf6 : 0xf7, 0, to );
	}
	to.xWriteImm( imm );
}
Example #2
0
void xImpl_Test::operator()( const xRegisterInt& to, int imm ) const
{
	to.prefix16();

	if( to.IsAccumulator() )
		xWrite8( to.Is8BitOp() ? 0xa8 : 0xa9 );
	else
	{
		xWrite8( to.Is8BitOp() ? 0xf6 : 0xf7 );
		EmitSibMagic( 0, to );
	}
	to.xWriteImm( imm );
}
Example #3
0
static void _g1_EmitOp( G1Type InstType, const xRegisterInt& to, int imm )
{
	to.prefix16();
	if( !to.Is8BitOp() && is_s8( imm ) )
	{
		xWrite8( 0x83 );
		EmitSibMagic( InstType, to );
		xWrite<s8>( imm );
	}
	else
	{
		if( to.IsAccumulator() )
			xWrite8( (to.Is8BitOp() ? 4 : 5) | (InstType<<3) );
		else
		{
			xWrite8( to.Is8BitOp() ? 0x80 : 0x81 );
			EmitSibMagic( InstType, to );
		}
		to.xWriteImm( imm );
	}
}