本文整理汇总了C++中emit_2ub函数的典型用法代码示例。如果您正苦于以下问题:C++ emit_2ub函数的具体用法?C++ emit_2ub怎么用?C++ emit_2ub使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了emit_2ub函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: x87_arith_op
static void x87_arith_op( struct x86_function *p, struct x86_reg dst, struct x86_reg arg,
unsigned char dst0ub0,
unsigned char dst0ub1,
unsigned char arg0ub0,
unsigned char arg0ub1,
unsigned char argmem_noreg)
{
assert(dst.file == file_x87);
if (arg.file == file_x87) {
if (dst.idx == 0)
emit_2ub(p, dst0ub0, dst0ub1+arg.idx);
else if (arg.idx == 0)
emit_2ub(p, arg0ub0, arg0ub1+arg.idx);
else
assert(0);
}
else if (dst.idx == 0) {
assert(arg.file == file_REG32);
emit_1ub(p, 0xd8);
emit_modrm_noreg(p, argmem_noreg, arg);
}
else
assert(0);
}
示例2: emit_2ub
/* Always use a 32bit offset for forward jumps:
*/
unsigned char *x86_jcc_forward( struct x86_function *p,
enum x86_cc cc )
{
emit_2ub(p, 0x0f, 0x80 + cc);
emit_1i(p, 0);
return x86_get_label(p);
}
示例3: sse_movss
void sse_movss( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
emit_2ub(p, 0xF3, X86_TWOB);
emit_op_modrm( p, 0x10, 0x11, dst, src );
}
示例4: sse_rsqrtps
void sse_rsqrtps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
emit_2ub(p, X86_TWOB, 0x52);
emit_modrm( p, dst, src );
}
示例5: sse2_rcpps
void sse2_rcpps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
emit_2ub(p, X86_TWOB, 0x53);
emit_modrm( p, dst, src );
}
示例6: sse2_movd
void sse2_movd( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
emit_2ub(p, 0x66, X86_TWOB);
emit_op_modrm( p, 0x6e, 0x7e, dst, src );
}
示例7: sse_prefetch1
void sse_prefetch1( struct x86_function *p, struct x86_reg ptr)
{
DUMP_R( ptr );
assert(ptr.mod != mod_REG);
emit_2ub(p, 0x0f, 0x18);
emit_modrm_noreg(p, 2, ptr);
}
示例8: mmx_emms
void mmx_emms( struct x86_function *p )
{
DUMP();
assert(p->need_emms);
emit_2ub(p, 0x0f, 0x77);
p->need_emms = 0;
}
示例9: x86_jcc
void x86_jcc( struct x86_function *p,
enum x86_cc cc,
int label )
{
int offset = label - (x86_get_label(p) + 2);
DUMP_I(cc);
if (offset < 0) {
/*assert(p->csr - p->store > -offset);*/
if (p->csr - p->store <= -offset) {
/* probably out of memory (using the error_overflow buffer) */
return;
}
}
if (offset <= 127 && offset >= -128) {
emit_1ub(p, 0x70 + cc);
emit_1b(p, (char) offset);
}
else {
offset = label - (x86_get_label(p) + 6);
emit_2ub(p, 0x0f, 0x80 + cc);
emit_1i(p, offset);
}
}
示例10: x87_fucompp
void x87_fucompp( struct x86_function *p )
{
DUMP();
emit_2ub(p, 0xda, 0xe9);
note_x87_pop(p); /* pop twice */
note_x87_pop(p); /* pop twice */
}
示例11: x87_fucomp
void x87_fucomp( struct x86_function *p, struct x86_reg arg )
{
DUMP_R( arg );
assert(arg.file == file_x87);
emit_2ub(p, 0xdd, 0xe8+arg.idx);
note_x87_pop(p);
}
示例12: sse2_cvtdq2ps
void sse2_cvtdq2ps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
DUMP_RR( dst, src );
emit_2ub(p, X86_TWOB, 0x5b);
emit_modrm( p, dst, src );
}
示例13: sse_xorps
void sse_xorps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
DUMP_RR( dst, src );
emit_2ub(p, X86_TWOB, 0x57);
emit_modrm( p, dst, src );
}
示例14: x86_imul
void x86_imul( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
DUMP_RR( dst, src );
emit_2ub(p, X86_TWOB, 0xAF);
emit_modrm(p, dst, src);
}
示例15: x86_jcc_forward
/* Always use a 32bit offset for forward jumps:
*/
int x86_jcc_forward( struct x86_function *p,
enum x86_cc cc )
{
DUMP_I(cc);
emit_2ub(p, 0x0f, 0x80 + cc);
emit_1i(p, 0);
return x86_get_label(p);
}