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

Unified Diff: src/wasm/wasm-opcodes.cc

Issue 1991143002: Convert SIMD wasm ops to runtime function calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
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() {

Powered by Google App Engine
This is Rietveld 408576698