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); }
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); }
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); }
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); }
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); }
/* 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 ); }
void x86_pop( struct x86_function *p, struct x86_reg reg ) { DUMP_R( reg ); assert(reg.mod == mod_REG); emit_1ub(p, 0x58 + reg.idx); p->stack_offset -= 4; }
void x87_fdivrp( struct x86_function *p, struct x86_reg dst ) { DUMP_R( dst ); assert(dst.file == file_x87); assert(dst.idx >= 1); emit_2ub(p, 0xde, 0xf0+dst.idx); note_x87_pop(p); }
void x87_fldcw( struct x86_function *p, struct x86_reg arg ) { DUMP_R( arg ); assert(arg.file == file_REG32); assert(arg.mod != mod_REG); emit_1ub(p, 0xd9); emit_modrm_noreg(p, 5, arg); }
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); }
void x87_fcom( struct x86_function *p, struct x86_reg dst ) { DUMP_R( dst ); if (dst.file == file_x87) emit_2ub(p, 0xd8, 0xd0 + dst.idx); else { emit_1ub(p, 0xd8); emit_modrm_noreg(p, 2, dst); } }
void x87_fld( struct x86_function *p, struct x86_reg arg ) { DUMP_R( arg ); if (arg.file == file_x87) emit_2ub(p, 0xd9, 0xc0 + arg.idx); else { emit_1ub(p, 0xd9); emit_modrm_noreg(p, 0, arg); } note_x87_push(p); }
void x87_fstp( struct x86_function *p, struct x86_reg dst ) { DUMP_R( dst ); if (dst.file == file_x87) emit_2ub(p, 0xdd, 0xd8 + dst.idx); else { emit_1ub(p, 0xd9); emit_modrm_noreg(p, 3, dst); } note_x87_pop(p); }
void x87_fnstsw( struct x86_function *p, struct x86_reg dst ) { DUMP_R( dst ); assert(dst.file == file_REG32); if (dst.idx == reg_AX && dst.mod == mod_REG) emit_2ub(p, 0xdf, 0xe0); else { emit_1ub(p, 0xdd); emit_modrm_noreg(p, 7, dst); } }
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; }
void x87_fcmovnbe( struct x86_function *p, struct x86_reg arg ) { DUMP_R( arg ); assert(arg.file == file_x87); emit_2ub(p, 0xdb, 0xd0+arg.idx); }
void x87_fxch( struct x86_function *p, struct x86_reg arg ) { DUMP_R( arg ); assert(arg.file == file_x87); emit_2ub(p, 0xd9, 0xc8+arg.idx); }
void x87_fcomip( struct x86_function *p, struct x86_reg arg ) { DUMP_R( arg ); emit_2ub(p, 0xdb, 0xf0+arg.idx); note_x87_pop(p); }
void x86_call( struct x86_function *p, struct x86_reg reg) { DUMP_R( reg ); emit_1ub(p, 0xff); emit_modrm_noreg(p, 2, reg); }
void x87_fist( struct x86_function *p, struct x86_reg dst ) { DUMP_R( dst ); emit_1ub(p, 0xdb); emit_modrm_noreg(p, 2, dst); }