本文整理汇总了C++中emit_1ub函数的典型用法代码示例。如果您正苦于以下问题:C++ emit_1ub函数的具体用法?C++ emit_1ub怎么用?C++ emit_1ub使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了emit_1ub函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: x87_fnstcw
void x87_fnstcw( struct x86_function *p, struct x86_reg dst )
{
DUMP_R( dst );
assert(dst.file == file_REG32);
emit_1ub(p, 0x9b); /* WAIT -- needed? */
emit_1ub(p, 0xd9);
emit_modrm_noreg(p, 7, dst);
}
示例2: x86_mov16_imm
void x86_mov16_imm( struct x86_function *p, struct x86_reg dst, uint16_t imm )
{
DUMP_RI( dst, imm );
emit_1ub(p, 0x66);
if(dst.mod == mod_REG)
{
emit_1ub(p, 0xb8 + dst.idx);
emit_2ub(p, imm & 0xff, imm >> 8);
}
示例3: x86_push
void x86_push( struct x86_function *p,
struct x86_reg reg )
{
DUMP_R( reg );
if (reg.mod == mod_REG)
emit_1ub(p, 0x50 + reg.idx);
else
{
emit_1ub(p, 0xff);
emit_modrm_noreg(p, 6, reg);
}
p->stack_offset += 4;
}
示例4: x87_fistp
void x87_fistp( struct x86_function *p, struct x86_reg dst )
{
DUMP_R( dst );
emit_1ub(p, 0xdb);
emit_modrm_noreg(p, 3, dst);
note_x87_pop(p);
}
示例5: x87_fild
void x87_fild( struct x86_function *p, struct x86_reg arg )
{
DUMP_R( arg );
emit_1ub(p, 0xdf);
emit_modrm_noreg(p, 0, arg);
note_x87_push(p);
}
示例6: sse_movups
void sse_movups( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
emit_1ub(p, X86_TWOB);
emit_op_modrm( p, 0x10, 0x11, dst, src );
}
示例7: x86_test
void x86_test( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
emit_1ub(p, 0x85);
emit_modrm( p, dst, src );
}
示例8: 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);
}
示例9: x87_fldcw
void x87_fldcw( struct x86_function *p, struct x86_reg arg )
{
assert(arg.file == file_REG32);
assert(arg.mod != mod_REG);
emit_1ub(p, 0xd9);
emit_modrm_noreg(p, 5, arg);
}
示例10: x86_mul
/* Calculate EAX * src, results in EDX:EAX.
*/
void x86_mul( struct x86_function *p,
struct x86_reg src )
{
DUMP_R( src );
emit_1ub(p, 0xf7);
emit_modrm_noreg(p, 4, src );
}
示例11: 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);
}
}
示例12: x86_dec
void x86_dec( struct x86_function *p,
struct x86_reg reg )
{
DUMP_R( reg );
assert(reg.mod == mod_REG);
emit_1ub(p, 0x48 + reg.idx);
}
示例13: x86_jmp_forward
int x86_jmp_forward( struct x86_function *p)
{
DUMP();
emit_1ub(p, 0xe9);
emit_1i(p, 0);
return x86_get_label(p);
}
示例14: x86_pop
void x86_pop( struct x86_function *p,
struct x86_reg reg )
{
assert(reg.mod == mod_REG);
emit_1ub(p, 0x58 + reg.idx);
p->stack_offset -= 4;
}
示例15: x86_lea
void x86_lea( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src )
{
emit_1ub(p, 0x8d);
emit_modrm( p, dst, src );
}