Add packed integer add opcodes (v128) to instruction set enum

This commit is contained in:
Johnnie Birch
2020-08-05 09:37:52 -07:00
parent b5a6daedc4
commit 2eadc6e2a8
3 changed files with 18 additions and 0 deletions

View File

@@ -349,10 +349,12 @@ fn lower_insn_to_regs<C: LowerCtx<I = Inst>>(
let lhs = input_to_reg(ctx, inputs[0]);
let rhs = input_to_reg_mem_imm(ctx, inputs[1]);
let dst = output_to_reg(ctx, outputs[0]);
let ty = ty.unwrap();
// TODO For commutative operations (add, mul, and, or, xor), try to commute the
// operands if one is an immediate.
println!("Type: {}", ty);
let is_64 = int_ty_is_64(ty.unwrap());
let alu_op = match op {
Opcode::Iadd | Opcode::IaddIfcout => AluRmiROpcode::Add,