|
|
@ -1820,8 +1820,6 @@ pub(crate) fn emit( |
|
|
|
SseOpcode::Andpd => (LegacyPrefixes::_66, 0x0F54, 2), |
|
|
|
SseOpcode::Andnps => (LegacyPrefixes::None, 0x0F55, 2), |
|
|
|
SseOpcode::Andnpd => (LegacyPrefixes::_66, 0x0F55, 2), |
|
|
|
SseOpcode::Blendvps => (LegacyPrefixes::_66, 0x0F3814, 3), |
|
|
|
SseOpcode::Blendvpd => (LegacyPrefixes::_66, 0x0F3815, 3), |
|
|
|
SseOpcode::Divps => (LegacyPrefixes::None, 0x0F5E, 2), |
|
|
|
SseOpcode::Divpd => (LegacyPrefixes::_66, 0x0F5E, 2), |
|
|
|
SseOpcode::Divss => (LegacyPrefixes::_F3, 0x0F5E, 2), |
|
|
@ -1859,7 +1857,6 @@ pub(crate) fn emit( |
|
|
|
SseOpcode::Pandn => (LegacyPrefixes::_66, 0x0FDF, 2), |
|
|
|
SseOpcode::Pavgb => (LegacyPrefixes::_66, 0x0FE0, 2), |
|
|
|
SseOpcode::Pavgw => (LegacyPrefixes::_66, 0x0FE3, 2), |
|
|
|
SseOpcode::Pblendvb => (LegacyPrefixes::_66, 0x0F3810, 3), |
|
|
|
SseOpcode::Pcmpeqb => (LegacyPrefixes::_66, 0x0F74, 2), |
|
|
|
SseOpcode::Pcmpeqw => (LegacyPrefixes::_66, 0x0F75, 2), |
|
|
|
SseOpcode::Pcmpeqd => (LegacyPrefixes::_66, 0x0F76, 2), |
|
|
@ -1924,6 +1921,39 @@ pub(crate) fn emit( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Inst::XmmRmRBlend { |
|
|
|
op, |
|
|
|
src1, |
|
|
|
src2, |
|
|
|
dst, |
|
|
|
mask, |
|
|
|
} => { |
|
|
|
let src1 = allocs.next(src1.to_reg()); |
|
|
|
let mask = allocs.next(mask.to_reg()); |
|
|
|
debug_assert_eq!(mask, regs::xmm0()); |
|
|
|
let reg_g = allocs.next(dst.to_reg().to_reg()); |
|
|
|
debug_assert_eq!(src1, reg_g); |
|
|
|
let src_e = src2.clone().to_reg_mem().with_allocs(allocs); |
|
|
|
|
|
|
|
let rex = RexFlags::clear_w(); |
|
|
|
let (prefix, opcode, length) = match op { |
|
|
|
SseOpcode::Blendvps => (LegacyPrefixes::_66, 0x0F3814, 3), |
|
|
|
SseOpcode::Blendvpd => (LegacyPrefixes::_66, 0x0F3815, 3), |
|
|
|
SseOpcode::Pblendvb => (LegacyPrefixes::_66, 0x0F3810, 3), |
|
|
|
_ => unimplemented!("Opcode {:?} not implemented", op), |
|
|
|
}; |
|
|
|
|
|
|
|
match src_e { |
|
|
|
RegMem::Reg { reg: reg_e } => { |
|
|
|
emit_std_reg_reg(sink, prefix, opcode, length, reg_g, reg_e, rex); |
|
|
|
} |
|
|
|
RegMem::Mem { addr } => { |
|
|
|
let addr = &addr.finalize(state, sink); |
|
|
|
emit_std_reg_mem(sink, info, prefix, opcode, length, reg_g, addr, rex, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Inst::XmmRmRVex { |
|
|
|
op, |
|
|
|
src1, |
|
|
|