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

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: Bill's review 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) {
titzer 2016/05/19 09:43:27 Could we make this into a range check instead of a
gdeepti 2016/07/01 22:24:48 Converted to a prefix check.
+ switch (opcode) {
+#define IS_SIMD_OPCODE(name, opcode, sig) \
+ case kExpr##name: \
+ if (kExpr##name == opcode) { \
titzer 2016/05/19 09:43:27 The if here is redundant.
gdeepti 2016/07/01 22:24:48 Function now removed.
+ 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