Skip to content

Commit

Permalink
Add emit tests to ext_mul_* instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jlb6740 committed Jul 14, 2021
1 parent 6ccd1d8 commit 384b69b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cranelift/codegen/src/isa/x64/inst/emit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3555,6 +3555,24 @@ fn test_x64_emit() {
"psubq %xmm8, %xmm1",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Pmuldq, RegMem::reg(xmm4), w_xmm15),
"66440F3828FC",
"pmuldq %xmm4, %xmm15",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Pmulhw, RegMem::reg(xmm9), w_xmm1),
"66410FE5C9",
"pmulhw %xmm9, %xmm1",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Pmulhuw, RegMem::reg(xmm7), w_xmm9),
"66440FE4CF",
"pmulhuw %xmm7, %xmm9",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Pmulld, RegMem::reg(xmm15), w_xmm6),
"66410F3840F7",
Expand Down Expand Up @@ -3711,12 +3729,24 @@ fn test_x64_emit() {
"punpckhbw %xmm3, %xmm2",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Punpckhwd, RegMem::reg(xmm13), w_xmm2),
"66410F69D5",
"punpckhwd %xmm13, %xmm2",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Punpcklbw, RegMem::reg(xmm1), w_xmm8),
"66440F60C1",
"punpcklbw %xmm1, %xmm8",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Punpcklwd, RegMem::reg(xmm11), w_xmm8),
"66450F61C3",
"punpcklwd %xmm11, %xmm8",
));

insns.push((
Inst::xmm_rm_r(SseOpcode::Unpcklps, RegMem::reg(xmm11), w_xmm2),
"410F14D3",
Expand Down

0 comments on commit 384b69b

Please sign in to comment.