Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: src/compiler/x64/instruction-selector-x64.cc

Issue 2767983002: [wasm] Implement wasm x64 I16x8 Ops (Closed)
Patch Set: Bill's review Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/x64/instruction-scheduler-x64.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index 89dc95631828970fcca9954ec019a99acf4a48f8..b67910ce7f46bab3ba8af718ff49db9da8494692 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -2438,7 +2438,13 @@ VISIT_ATOMIC_BINOP(Or)
VISIT_ATOMIC_BINOP(Xor)
#undef VISIT_ATOMIC_BINOP
-#define SIMD_TYPES(V) V(I32x4)
+#define SIMD_TYPES(V) \
+ V(I32x4) \
+ V(I16x8)
+
+#define SIMD_FORMAT_LIST(V) \
+ V(32x4) \
+ V(16x8)
#define SIMD_ZERO_OP_LIST(V) \
V(S128Zero) \
@@ -2446,11 +2452,6 @@ VISIT_ATOMIC_BINOP(Xor)
V(S1x8Zero) \
V(S1x16Zero)
-#define SIMD_SHIFT_OPCODES(V) \
- V(I32x4Shl) \
- V(I32x4ShrS) \
- V(I32x4ShrU)
-
#define SIMD_BINOP_LIST(V) \
V(I32x4Add) \
V(I32x4Sub) \
@@ -2460,7 +2461,28 @@ VISIT_ATOMIC_BINOP(Xor)
V(I32x4Eq) \
V(I32x4Ne) \
V(I32x4MinU) \
- V(I32x4MaxU)
+ V(I32x4MaxU) \
+ V(I16x8Add) \
+ V(I16x8AddSaturateS) \
+ V(I16x8Sub) \
+ V(I16x8SubSaturateS) \
+ V(I16x8Mul) \
+ V(I16x8MinS) \
+ V(I16x8MaxS) \
+ V(I16x8Eq) \
+ V(I16x8Ne) \
+ V(I16x8AddSaturateU) \
+ V(I16x8SubSaturateU) \
+ V(I16x8MinU) \
+ V(I16x8MaxU)
+
+#define SIMD_SHIFT_OPCODES(V) \
+ V(I32x4Shl) \
+ V(I32x4ShrS) \
+ V(I32x4ShrU) \
+ V(I16x8Shl) \
+ V(I16x8ShrS) \
+ V(I16x8ShrU)
#define VISIT_SIMD_SPLAT(Type) \
void InstructionSelector::Visit##Type##Splat(Node* node) { \
@@ -2519,12 +2541,15 @@ SIMD_SHIFT_OPCODES(VISIT_SIMD_SHIFT)
SIMD_BINOP_LIST(VISIT_SIMD_BINOP)
#undef VISIT_SIMD_BINOP
-void InstructionSelector::VisitS32x4Select(Node* node) {
- X64OperandGenerator g(this);
- Emit(kX64S32x4Select, g.DefineSameAsFirst(node),
- g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1)),
- g.UseRegister(node->InputAt(2)));
-}
+#define SIMD_VISIT_SELECT_OP(format) \
+ void InstructionSelector::VisitS##format##Select(Node* node) { \
+ X64OperandGenerator g(this); \
+ Emit(kX64S128Select, g.DefineSameAsFirst(node), \
+ g.UseRegister(node->InputAt(0)), g.UseRegister(node->InputAt(1)), \
+ g.UseRegister(node->InputAt(2))); \
+ }
+SIMD_FORMAT_LIST(SIMD_VISIT_SELECT_OP)
+#undef SIMD_VISIT_SELECT_OP
void InstructionSelector::VisitInt32AbsWithOverflow(Node* node) {
UNREACHABLE();
« no previous file with comments | « src/compiler/x64/instruction-scheduler-x64.cc ('k') | src/x64/assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698