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

Side by Side Diff: src/wasm/wasm-opcodes.h

Issue 2137993003: [wasm] Adding feature to JIT a wasm function at runtime and hook up the compiled code into the indi… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixing unit test- Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_WASM_OPCODES_H_ 5 #ifndef V8_WASM_OPCODES_H_
6 #define V8_WASM_OPCODES_H_ 6 #define V8_WASM_OPCODES_H_
7 7
8 #include "src/machine-type.h" 8 #include "src/machine-type.h"
9 #include "src/signature.h" 9 #include "src/signature.h"
10 10
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 V(I8x16Shr_u, 0xe571, s_ss) \ 399 V(I8x16Shr_u, 0xe571, s_ss) \
400 V(I8x16Lt_u, 0xe572, s_ss) \ 400 V(I8x16Lt_u, 0xe572, s_ss) \
401 V(I8x16Le_u, 0xe573, s_ss) \ 401 V(I8x16Le_u, 0xe573, s_ss) \
402 V(I8x16Gt_u, 0xe574, s_ss) \ 402 V(I8x16Gt_u, 0xe574, s_ss) \
403 V(I8x16Ge_u, 0xe575, s_ss) \ 403 V(I8x16Ge_u, 0xe575, s_ss) \
404 V(S128And, 0xe576, s_ss) \ 404 V(S128And, 0xe576, s_ss) \
405 V(S128Ior, 0xe577, s_ss) \ 405 V(S128Ior, 0xe577, s_ss) \
406 V(S128Xor, 0xe578, s_ss) \ 406 V(S128Xor, 0xe578, s_ss) \
407 V(S128Not, 0xe579, s_s) 407 V(S128Not, 0xe579, s_s)
408 408
409 // For enabling JIT functionality
410 #define FOREACH_JIT_OPCODE(V) V(JITSingleFunction, 0xf0, _)
411
409 // All opcodes. 412 // All opcodes.
410 #define FOREACH_OPCODE(V) \ 413 #define FOREACH_OPCODE(V) \
411 FOREACH_CONTROL_OPCODE(V) \ 414 FOREACH_CONTROL_OPCODE(V) \
412 FOREACH_MISC_OPCODE(V) \ 415 FOREACH_MISC_OPCODE(V) \
413 FOREACH_SIMPLE_OPCODE(V) \ 416 FOREACH_SIMPLE_OPCODE(V) \
414 FOREACH_SIMPLE_MEM_OPCODE(V) \ 417 FOREACH_SIMPLE_MEM_OPCODE(V) \
415 FOREACH_STORE_MEM_OPCODE(V) \ 418 FOREACH_STORE_MEM_OPCODE(V) \
416 FOREACH_LOAD_MEM_OPCODE(V) \ 419 FOREACH_LOAD_MEM_OPCODE(V) \
417 FOREACH_MISC_MEM_OPCODE(V) \ 420 FOREACH_MISC_MEM_OPCODE(V) \
418 FOREACH_ASMJS_COMPAT_OPCODE(V) \ 421 FOREACH_ASMJS_COMPAT_OPCODE(V) \
419 FOREACH_SIMD_OPCODE(V) 422 FOREACH_SIMD_OPCODE(V) \
423 FOREACH_JIT_OPCODE(V)
420 424
421 // All signatures. 425 // All signatures.
422 #define FOREACH_SIGNATURE(V) \ 426 #define FOREACH_SIGNATURE(V) \
423 FOREACH_SIMD_SIGNATURE(V) \ 427 FOREACH_SIMD_SIGNATURE(V) \
424 V(i_ii, kAstI32, kAstI32, kAstI32) \ 428 V(i_ii, kAstI32, kAstI32, kAstI32) \
425 V(i_i, kAstI32, kAstI32) \ 429 V(i_i, kAstI32, kAstI32) \
426 V(i_v, kAstI32) \ 430 V(i_v, kAstI32) \
427 V(i_ff, kAstI32, kAstF32, kAstF32) \ 431 V(i_ff, kAstI32, kAstF32, kAstF32) \
428 V(i_f, kAstI32, kAstF32) \ 432 V(i_f, kAstI32, kAstF32) \
429 V(i_dd, kAstI32, kAstF64, kAstF64) \ 433 V(i_dd, kAstI32, kAstF64, kAstF64) \
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // The reason for a trap. 475 // The reason for a trap.
472 #define FOREACH_WASM_TRAPREASON(V) \ 476 #define FOREACH_WASM_TRAPREASON(V) \
473 V(TrapUnreachable) \ 477 V(TrapUnreachable) \
474 V(TrapMemOutOfBounds) \ 478 V(TrapMemOutOfBounds) \
475 V(TrapDivByZero) \ 479 V(TrapDivByZero) \
476 V(TrapDivUnrepresentable) \ 480 V(TrapDivUnrepresentable) \
477 V(TrapRemByZero) \ 481 V(TrapRemByZero) \
478 V(TrapFloatUnrepresentable) \ 482 V(TrapFloatUnrepresentable) \
479 V(TrapFuncInvalid) \ 483 V(TrapFuncInvalid) \
480 V(TrapFuncSigMismatch) \ 484 V(TrapFuncSigMismatch) \
481 V(TrapMemAllocationFail) 485 V(TrapMemAllocationFail) \
486 V(TrapInvalidIndex)
482 487
483 enum TrapReason { 488 enum TrapReason {
484 #define DECLARE_ENUM(name) k##name, 489 #define DECLARE_ENUM(name) k##name,
485 FOREACH_WASM_TRAPREASON(DECLARE_ENUM) 490 FOREACH_WASM_TRAPREASON(DECLARE_ENUM)
486 kTrapCount 491 kTrapCount
487 #undef DECLARE_ENUM 492 #undef DECLARE_ENUM
488 }; 493 };
489 494
490 // A collection of opcode-related static methods. 495 // A collection of opcode-related static methods.
491 class WasmOpcodes { 496 class WasmOpcodes {
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 default: 672 default:
668 return "<unknown>"; 673 return "<unknown>";
669 } 674 }
670 } 675 }
671 }; 676 };
672 } // namespace wasm 677 } // namespace wasm
673 } // namespace internal 678 } // namespace internal
674 } // namespace v8 679 } // namespace v8
675 680
676 #endif // V8_WASM_OPCODES_H_ 681 #endif // V8_WASM_OPCODES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698