Exemplo n.º 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 );
}
Exemplo n.º 2
0
void xImpl_IncDec::operator()(const xRegisterInt &to) const
{
    if (to.Is8BitOp()) {
        u8 regfield = isDec ? 1 : 0;
        xOpWrite(to.GetPrefix16(), 0xfe, regfield, to);
    } else {
#ifdef __x86_64__
        pxAssertMsg(0, "Single Byte INC/DEC aren't valid in 64 bits."
                       "You need to use the ModR/M form (FF/0 FF/1 opcodes)");
#endif
        to.prefix16();
        xWrite8((isDec ? 0x48 : 0x40) | to.Id);
    }
}
Exemplo n.º 3
0
// =====================================================================================================
//  TEST / INC / DEC
// =====================================================================================================
void xImpl_Test::operator()( const xRegisterInt& to, const xRegisterInt& from ) const
{
	pxAssert( to.GetOperandSize() == from.GetOperandSize() );
	xOpWrite( to.GetPrefix16(), to.Is8BitOp() ? 0x84 : 0x85, from, to );
}