Add x86 encoding for isub

This commit is contained in:
Andrew Brown
2019-09-17 13:38:52 -07:00
parent 4e3cb25983
commit ca1df499a0
4 changed files with 59 additions and 4 deletions

View File

@@ -1940,6 +1940,12 @@ pub(crate) fn define(
e.enc_32_64(iadd, rec_fa.opcodes(*opcodes));
}
// SIMD integer subtraction
for (ty, opcodes) in &[(I8, &PSUBB), (I16, &PSUBW), (I32, &PSUBD), (I64, &PSUBQ)] {
let isub = isub.bind_vector_from_lane(ty.clone(), sse_vector_size);
e.enc_32_64(isub, rec_fa.opcodes(*opcodes));
}
// SIMD icmp using PCMPEQ*
let mut pcmpeq_mapping: HashMap<u64, (&[u8], Option<SettingPredicateNumber>)> = HashMap::new();
pcmpeq_mapping.insert(8, (&PCMPEQB, None));