machinst x64: implement floating point comparisons

Note that this fixes an encoding issue in which the packed single and packed double prefixes were flipped.
This commit is contained in:
Andrew Brown
2020-08-04 11:12:01 -07:00
parent 3d2e0e55f2
commit 8cfff26957
4 changed files with 142 additions and 82 deletions

View File

@@ -3190,6 +3190,19 @@ fn test_x64_emit() {
"psrlq $1, %xmm3",
));
// ========================================================
// XmmRmRImm
insns.push((
Inst::xmm_rm_r_imm(SseOpcode::Cmppd, RegMem::reg(xmm5), w_xmm1, 2),
"660FC2CD02",
"cmppd $2, %xmm5, %xmm1",
));
insns.push((
Inst::xmm_rm_r_imm(SseOpcode::Cmpps, RegMem::reg(xmm15), w_xmm7, 0),
"410FC2FF00",
"cmpps $0, %xmm15, %xmm7",
));
// ========================================================
// Misc instructions.