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

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

Issue 1729833002: Add wasm internal opcodes for asm.js stdlib functions we're missing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 10 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/wasm/ast-decoder.cc ('k') | src/wasm/wasm-opcodes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-opcodes.h
diff --git a/src/wasm/wasm-opcodes.h b/src/wasm/wasm-opcodes.h
index 1a1e273eff3b5cadb1b5162f077be259f43c81d5..bdf133c9dc2ddd9d6740256ea3eadb1f42c62e34 100644
--- a/src/wasm/wasm-opcodes.h
+++ b/src/wasm/wasm-opcodes.h
@@ -254,6 +254,20 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& function);
V(I32ReinterpretF32, 0xb4, i_f) \
V(I64ReinterpretF64, 0xb5, l_d)
+// For compatibility with Asm.js.
+#define FOREACH_ASMJS_COMPAT_OPCODE(V) \
+ V(F64Acos, 0xc0, d_d) \
+ V(F64Asin, 0xc1, d_d) \
+ V(F64Atan, 0xc2, d_d) \
+ V(F64Cos, 0xc3, d_d) \
+ V(F64Sin, 0xc4, d_d) \
+ V(F64Tan, 0xc5, d_d) \
+ V(F64Exp, 0xc6, d_d) \
+ V(F64Log, 0xc7, d_d) \
+ V(F64Atan2, 0xc8, d_dd) \
+ V(F64Pow, 0xc9, d_dd) \
+ V(F64Mod, 0xca, d_dd)
+
// All opcodes.
#define FOREACH_OPCODE(V) \
FOREACH_CONTROL_OPCODE(V) \
@@ -261,7 +275,8 @@ std::ostream& operator<<(std::ostream& os, const FunctionSig& function);
FOREACH_SIMPLE_OPCODE(V) \
FOREACH_STORE_MEM_OPCODE(V) \
FOREACH_LOAD_MEM_OPCODE(V) \
- FOREACH_MISC_MEM_OPCODE(V)
+ FOREACH_MISC_MEM_OPCODE(V) \
+ FOREACH_ASMJS_COMPAT_OPCODE(V)
// All signatures.
#define FOREACH_SIGNATURE(V) \
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | src/wasm/wasm-opcodes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698