jit f30f10/movss

This commit is contained in:
Fabian 2020-12-31 19:14:34 -06:00
parent b27285cb7b
commit cf4af74d95
3 changed files with 12 additions and 4 deletions

View file

@ -620,7 +620,7 @@ const encodings = [
// - skipped or missing are sse3+
{ sse: 1, opcode: 0x0F10, e: 1, custom: 1 },
{ sse: 1, opcode: 0xF30F10, e: 1 },
{ sse: 1, opcode: 0xF30F10, e: 1, custom: 1 },
{ sse: 1, opcode: 0x660F10, e: 1, custom: 1 },
{ sse: 1, opcode: 0xF20F10, e: 1, custom: 1 },
{ sse: 1, opcode: 0x0F11, e: 1, custom: 1 },

View file

@ -468,6 +468,7 @@ pub unsafe fn instr_0F0D() {
pub unsafe fn instr_0F0E() { undefined_instruction(); }
#[no_mangle]
pub unsafe fn instr_0F0F() { undefined_instruction(); }
pub unsafe fn instr_0F10(source: reg128, r: i32) {
// movups xmm, xmm/m128
mov_rm_r128(source, r);
@ -476,13 +477,11 @@ pub unsafe fn instr_0F10_reg(r1: i32, r2: i32) { instr_0F10(read_xmm128s(r1), r2
pub unsafe fn instr_0F10_mem(addr: i32, r: i32) {
instr_0F10(return_on_pagefault!(safe_read128s(addr)), r);
}
#[no_mangle]
pub unsafe fn instr_F30F10_reg(r1: i32, r2: i32) {
// movss xmm, xmm/m32
let data = read_xmm128s(r1);
write_xmm32(r2, data.u32_0[0] as i32);
}
#[no_mangle]
pub unsafe fn instr_F30F10_mem(addr: i32, r: i32) {
// movss xmm, xmm/m32
let data = return_on_pagefault!(safe_read32s(addr));
@ -502,7 +501,6 @@ pub unsafe fn instr_F20F10_reg(r1: i32, r2: i32) {
let data = read_xmm128s(r1);
write_xmm64(r2, data.u64_0[0]);
}
#[no_mangle]
pub unsafe fn instr_F20F10_mem(addr: i32, r: i32) {
// movsd xmm, xmm/m64
let data = return_on_pagefault!(safe_read64s(addr));

View file

@ -4790,6 +4790,16 @@ pub fn instr_F20F10_reg_jit(ctx: &mut JitContext, r1: u32, r2: u32) {
ctx.builder.const_i32(r2 as i32);
ctx.builder.call_fn2("instr_F20F10_reg");
}
pub fn instr_F30F10_mem_jit(ctx: &mut JitContext, modrm_byte: ModrmByte, r: u32) {
instr_660F6E_mem_jit(ctx, modrm_byte, r)
}
pub fn instr_F30F10_reg_jit(ctx: &mut JitContext, r1: u32, r2: u32) {
ctx.builder.const_i32(0);
ctx.builder
.load_fixed_i32(global_pointers::get_reg_xmm_offset(r1));
ctx.builder
.store_aligned_i32(global_pointers::get_reg_xmm_offset(r2));
}
pub fn instr_0F11_mem_jit(ctx: &mut JitContext, modrm_byte: ModrmByte, r: u32) {
instr_0F29_mem_jit(ctx, modrm_byte, r)