Index: src/wasm/wasm-opcodes.cc |
diff --git a/src/wasm/wasm-opcodes.cc b/src/wasm/wasm-opcodes.cc |
index a08fa8dbe6bc458f6ea0993881ed0f20d6bb9491..7d4e82f79e6b9b48f830fd8cb81f6b0f2112d2eb 100644 |
--- a/src/wasm/wasm-opcodes.cc |
+++ b/src/wasm/wasm-opcodes.cc |
@@ -79,6 +79,20 @@ static void InitSigTable() { |
#undef SET_SIG_TABLE |
} |
+bool WasmOpcodes::IsSimd(WasmOpcode opcode) { |
+ switch (opcode) { |
+#define IS_SIMD_OPCODE(name, opcode, sig) \ |
+ case kExpr##name: \ |
+ if (kExpr##name == opcode) { \ |
+ return true; \ |
+ } |
+ FOREACH_SIMD_OPCODE(IS_SIMD_OPCODE) |
+#undef IS_SIMD_OPCODE |
+ default: |
+ return false; |
+ } |
+} |
+ |
class SigTable { |
public: |
SigTable() { |