Add support for some packed multiplication for new x64 backend

Adds support for i32x4, and i16x8 and lowering for pmuludq in
preperation for i64x2.
This commit is contained in:
Johnnie Birch
2020-08-17 13:44:10 -07:00
parent 81b3450114
commit a31336996c
4 changed files with 80 additions and 44 deletions

View File

@@ -357,6 +357,11 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
types::I64X2 => SseOpcode::Psubq,
_ => panic!("Unsupported type for packed Isub instruction"),
},
Opcode::Imul => match ty {
types::I16X8 => SseOpcode::Pmullw,
types::I32X4 => SseOpcode::Pmulld,
_ => panic!("Unsupported type for packed Imul instruction"),
},
_ => panic!("Unsupported packed instruction"),
};
let lhs = input_to_reg(ctx, inputs[0]);