本文整理汇总了C++中xWrite8函数的典型用法代码示例。如果您正苦于以下问题:C++ xWrite8函数的具体用法?C++ xWrite8怎么用?C++ xWrite8使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xWrite8函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: xAdvancePtr
__emitinline void xAdvancePtr( uint bytes )
{
if( IsDevBuild )
{
// common debugger courtesy: advance with INT3 as filler.
for( uint i=0; i<bytes; i++ )
xWrite8( 0xcc );
}
else
x86Ptr += bytes;
}
示例2: _g1_EmitOp
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 );
}
}
示例3: pxAssert
xForwardJumpBase::xForwardJumpBase(uint opsize, JccComparisonType cctype)
{
pxAssert(opsize == 1 || opsize == 4);
pxAssertDev(cctype != Jcc_Unknown, "Invalid ForwardJump conditional type.");
BasePtr = (s8 *)xGetPtr() +
((opsize == 1) ? 2 : // j8's are always 2 bytes.
((cctype == Jcc_Unconditional) ? 5 : 6)); // j32's are either 5 or 6 bytes
if (opsize == 1)
xWrite8((cctype == Jcc_Unconditional) ? 0xeb : (0x70 | cctype));
else {
if (cctype == Jcc_Unconditional)
xWrite8(0xe9);
else {
xWrite8(0x0f);
xWrite8(0x80 | cctype);
}
}
xAdvancePtr(opsize);
}
示例4: xOpWrite
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);
}
}
示例5: _imul_ImmStyle
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 );
}
示例6: xCLC
__fi void xCLC() { xWrite8( 0xF8 ); }
示例7: xSTC
__fi void xSTC() { xWrite8( 0xF9 ); }
示例8: xPOP
__emitinline void xPOP( const xIndirectVoid& from )
{
xWrite8( 0x8f );
EmitSibMagic( 0, from );
}
示例9: xWrite8
void xImpl_Group2::operator()( const xRegisterInt& to, const xRegisterCL& /* from */ ) const
{
to.prefix16();
xWrite8( to.Is8BitOp() ? 0xd2 : 0xd3 );
EmitSibMagic( InstType, to );
}
示例10: _g3_EmitOp
static void _g3_EmitOp( G3Type InstType, const xRegisterInt& from )
{
from.prefix16();
xWrite8(from.Is8BitOp() ? 0xf6 : 0xf7 );
EmitSibMagic( InstType, from );
}
示例11: xPOPFD
// pops the EFLAGS register from the stack
__fi void xPOPFD() { xWrite8( 0x9D ); }
示例12: xLEAVE
__fi void xLEAVE() { xWrite8( 0xC9 ); }
示例13: xPUSH
__fi void xPUSH( xRegister32 from ) { xWrite8( 0x50 | from.Id ); }
示例14: xPUSHFD
// pushes the EFLAGS register onto the stack
__fi void xPUSHFD() { xWrite8( 0x9C ); }
示例15: xNOP
// NOP 1-byte
__fi void xNOP() { xWrite8(0x90); }