diff --git a/gen/x86_table.js b/gen/x86_table.js index 7492c0ecd7..48e1c9a35b 100644 --- a/gen/x86_table.js +++ b/gen/x86_table.js @@ -633,10 +633,10 @@ const encodings = [ { sse: 1, opcode: 0xF30F12, e: 1, skip: 1, block_boundary: 1, }, // sse3 { sse: 1, opcode: 0x0F13, reg_ud: 1, e: 1, custom: 1 }, { sse: 1, opcode: 0x660F13, reg_ud: 1, e: 1, custom: 1 }, - { sse: 1, opcode: 0x0F14, e: 1 }, - { sse: 1, opcode: 0x660F14, e: 1 }, - { sse: 1, opcode: 0x0F15, e: 1 }, - { sse: 1, opcode: 0x660F15, e: 1 }, + { sse: 1, opcode: 0x0F14, e: 1, custom: 1 }, + { sse: 1, opcode: 0x660F14, e: 1, custom: 1 }, + { sse: 1, opcode: 0x0F15, e: 1, custom: 1 }, + { sse: 1, opcode: 0x660F15, e: 1, custom: 1 }, { sse: 1, opcode: 0x0F16, e: 1 }, { sse: 1, opcode: 0x660F16, reg_ud: 1, e: 1 }, { sse: 1, opcode: 0xF30F16, skip: 1, e: 1, block_boundary: 1, }, // sse3 diff --git a/src/rust/cpu/instructions_0f.rs b/src/rust/cpu/instructions_0f.rs index 75a8bc1740..c0864387c5 100644 --- a/src/rust/cpu/instructions_0f.rs +++ b/src/rust/cpu/instructions_0f.rs @@ -574,6 +574,7 @@ pub unsafe fn instr_660F13_mem(addr: i32, r: i32) { // movlpd xmm/m64, xmm movl_r128_m64(addr, r); } +#[no_mangle] pub unsafe fn instr_0F14(source: u64, r: i32) { // unpcklps xmm, xmm/m128 // XXX: Aligned access or #gp @@ -586,12 +587,11 @@ pub unsafe fn instr_0F14(source: u64, r: i32) { (source >> 32) as i32, ); } -#[no_mangle] pub unsafe fn instr_0F14_reg(r1: i32, r2: i32) { instr_0F14(read_xmm64s(r1), r2); } -#[no_mangle] pub unsafe fn instr_0F14_mem(addr: i32, r: i32) { instr_0F14(return_on_pagefault!(safe_read64s(addr)), r); } +#[no_mangle] pub unsafe fn instr_660F14(source: u64, r: i32) { // unpcklpd xmm, xmm/m128 // XXX: Aligned access or #gp @@ -604,12 +604,11 @@ pub unsafe fn instr_660F14(source: u64, r: i32) { (source >> 32) as i32, ); } -#[no_mangle] pub unsafe fn instr_660F14_reg(r1: i32, r2: i32) { instr_660F14(read_xmm64s(r1), r2); } -#[no_mangle] pub unsafe fn instr_660F14_mem(addr: i32, r: i32) { instr_660F14(return_on_pagefault!(safe_read64s(addr)), r); } +#[no_mangle] pub unsafe fn instr_0F15(source: reg128, r: i32) { // unpckhps xmm, xmm/m128 // XXX: Aligned access or #gp @@ -622,12 +621,11 @@ pub unsafe fn instr_0F15(source: reg128, r: i32) { source.u32_0[3] as i32, ); } -#[no_mangle] pub unsafe fn instr_0F15_reg(r1: i32, r2: i32) { instr_0F15(read_xmm128s(r1), r2); } -#[no_mangle] pub unsafe fn instr_0F15_mem(addr: i32, r: i32) { instr_0F15(return_on_pagefault!(safe_read128s(addr)), r); } +#[no_mangle] pub unsafe fn instr_660F15(source: reg128, r: i32) { // unpckhpd xmm, xmm/m128 // XXX: Aligned access or #gp @@ -640,9 +638,7 @@ pub unsafe fn instr_660F15(source: reg128, r: i32) { source.u32_0[3] as i32, ); } -#[no_mangle] pub unsafe fn instr_660F15_reg(r1: i32, r2: i32) { instr_660F15(read_xmm128s(r1), r2); } -#[no_mangle] pub unsafe fn instr_660F15_mem(addr: i32, r: i32) { instr_660F15(return_on_pagefault!(safe_read128s(addr)), r); } diff --git a/src/rust/jit_instructions.rs b/src/rust/jit_instructions.rs index 64d20c77b8..327b700c35 100644 --- a/src/rust/jit_instructions.rs +++ b/src/rust/jit_instructions.rs @@ -5130,6 +5130,32 @@ pub fn instr_660F13_reg_jit(ctx: &mut JitContext, _r1: u32, _r2: u32) { codegen::gen_trigger_ud(ctx); } +pub fn instr_0F14_mem_jit(ctx: &mut JitContext, modrm_byte: ModrmByte, r: u32) { + sse_read64_xmm_mem(ctx, "instr_0F14", modrm_byte, r); +} +pub fn instr_0F14_reg_jit(ctx: &mut JitContext, r1: u32, r2: u32) { + sse_read64_xmm_xmm(ctx, "instr_0F14", r1, r2); +} +pub fn instr_660F14_mem_jit(ctx: &mut JitContext, modrm_byte: ModrmByte, r: u32) { + sse_read64_xmm_mem(ctx, "instr_660F14", modrm_byte, r); +} +pub fn instr_660F14_reg_jit(ctx: &mut JitContext, r1: u32, r2: u32) { + sse_read64_xmm_xmm(ctx, "instr_660F14", r1, r2); +} + +pub fn instr_0F15_mem_jit(ctx: &mut JitContext, modrm_byte: ModrmByte, r: u32) { + sse_read128_xmm_mem(ctx, "instr_0F15", modrm_byte, r); +} +pub fn instr_0F15_reg_jit(ctx: &mut JitContext, r1: u32, r2: u32) { + sse_read128_xmm_xmm(ctx, "instr_0F15", r1, r2); +} +pub fn instr_660F15_mem_jit(ctx: &mut JitContext, modrm_byte: ModrmByte, r: u32) { + sse_read128_xmm_mem(ctx, "instr_660F15", modrm_byte, r); +} +pub fn instr_660F15_reg_jit(ctx: &mut JitContext, r1: u32, r2: u32) { + sse_read128_xmm_xmm(ctx, "instr_660F15", r1, r2); +} + pub fn instr_0F28_mem_jit(ctx: &mut JitContext, modrm_byte: ModrmByte, r: u32) { let dest = global_pointers::get_reg_xmm_offset(r); codegen::gen_modrm_resolve_safe_read128(ctx, modrm_byte, dest);