[machinst x64]: implement bitmask

This commit is contained in:
Andrew Brown
2020-10-28 13:18:20 -07:00
parent 5b9a21e099
commit 6725b6b129
5 changed files with 100 additions and 4 deletions

View File

@@ -3292,6 +3292,12 @@ fn test_x64_emit() {
"pshufb %xmm11, %xmm2",
));
insns.push((
Inst::xmm_rm_r(SseOpcode::Packsswb, RegMem::reg(xmm11), w_xmm2, None),
"66410F63D3",
"packsswb %xmm11, %xmm2",
));
// ========================================================
// XMM_RM_R: Integer Conversion
insns.push((
@@ -3422,6 +3428,22 @@ fn test_x64_emit() {
"cvttsd2si %xmm0, %r15",
));
insns.push((
Inst::xmm_to_gpr(SseOpcode::Pmovmskb, xmm10, w_rax, OperandSize::Size32),
"66410FD7C2",
"pmovmskb %xmm10, %eax",
));
insns.push((
Inst::xmm_to_gpr(SseOpcode::Movmskps, xmm2, w_rax, OperandSize::Size32),
"0F50C2",
"movmskps %xmm2, %eax",
));
insns.push((
Inst::xmm_to_gpr(SseOpcode::Movmskpd, xmm0, w_rcx, OperandSize::Size32),
"660F50C8",
"movmskpd %xmm0, %ecx",
));
insns.push((
Inst::gpr_to_xmm(
SseOpcode::Movd,