Skip to content

Commit

Permalink
[simd/jit]: Implement simple i32x4 arithmetic operations (#78 from ha…
Browse files Browse the repository at this point in the history
…oyu-zc/jit-i32x4-arith)
  • Loading branch information
titzer authored Jul 19, 2023
2 parents 3d9a1c0 + 50f5265 commit f8d915d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/engine/x86-64/X86_64SinglePassCompiler.v3
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ class X86_64SinglePassCompiler extends SinglePassCompiler {
def visit_I8X16_ADD() { do_op2_x_x(ValueKind.V128, asm.paddb_s_s); }
def visit_I8X16_SUB() { do_op2_x_x(ValueKind.V128, asm.psubb_s_s); }

def visit_I32X4_ADD() { do_op2_x_x(ValueKind.V128, asm.paddd_s_s); }
def visit_I32X4_SUB() { do_op2_x_x(ValueKind.V128, asm.psubd_s_s); }
def visit_I32X4_MUL() { do_op2_x_x(ValueKind.V128, asm.pmulld_s_s); }
def visit_I16X8_ADD() { do_op2_x_x(ValueKind.V128, asm.paddw_s_s); }
def visit_I16X8_SUB() { do_op2_x_x(ValueKind.V128, asm.psubw_s_s); }
def visit_I16X8_MUL() { do_op2_x_x(ValueKind.V128, asm.pmullw_s_s); }
Expand All @@ -475,6 +478,7 @@ class X86_64SinglePassCompiler extends SinglePassCompiler {
state.push(sv.kindFlagsMatching(ValueKind.V128, IN_REG), sv.reg, 0);
}
def visit_I8X16_NEG() { visit_V128_NEG(mmasm.emit_i8x16_neg); }
def visit_I32X4_NEG() { visit_V128_NEG(mmasm.emit_i32x4_neg); }
def visit_I16X8_NEG() { visit_V128_NEG(mmasm.emit_i16x8_neg); }

def visit_V128_BITSELECT() {
Expand Down

0 comments on commit f8d915d

Please sign in to comment.