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

Side by Side Diff: src/wasm/module-decoder.cc

Issue 2009553002: Add Wasm SIMD opcodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix shuffle/swizzle signatures 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 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 #include "src/wasm/module-decoder.h" 5 #include "src/wasm/module-decoder.h"
6 6
7 #include "src/base/functional.h" 7 #include "src/base/functional.h"
8 #include "src/base/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 case kMemU32: 691 case kMemU32:
692 return MachineType::Uint32(); 692 return MachineType::Uint32();
693 case kMemI64: 693 case kMemI64:
694 return MachineType::Int64(); 694 return MachineType::Int64();
695 case kMemU64: 695 case kMemU64:
696 return MachineType::Uint64(); 696 return MachineType::Uint64();
697 case kMemF32: 697 case kMemF32:
698 return MachineType::Float32(); 698 return MachineType::Float32();
699 case kMemF64: 699 case kMemF64:
700 return MachineType::Float64(); 700 return MachineType::Float64();
701 case kMemS128:
702 return MachineType::Simd128();
701 default: 703 default:
702 error(pc_ - 1, "invalid memory type"); 704 error(pc_ - 1, "invalid memory type");
703 return MachineType::None(); 705 return MachineType::None();
704 } 706 }
705 } 707 }
706 708
707 // Parses a type entry, which is currently limited to functions only. 709 // Parses a type entry, which is currently limited to functions only.
708 FunctionSig* consume_sig() { 710 FunctionSig* consume_sig() {
709 const byte* pos = pc_; 711 const byte* pos = pc_;
710 byte form = consume_u8("type form"); 712 byte form = consume_u8("type form");
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 return FunctionError("size > maximum function size"); 816 return FunctionError("size > maximum function size");
815 isolate->counters()->wasm_function_size_bytes()->AddSample( 817 isolate->counters()->wasm_function_size_bytes()->AddSample(
816 static_cast<int>(size)); 818 static_cast<int>(size));
817 WasmFunction* function = new WasmFunction(); 819 WasmFunction* function = new WasmFunction();
818 ModuleDecoder decoder(zone, function_start, function_end, kWasmOrigin); 820 ModuleDecoder decoder(zone, function_start, function_end, kWasmOrigin);
819 return decoder.DecodeSingleFunction(module_env, function); 821 return decoder.DecodeSingleFunction(module_env, function);
820 } 822 }
821 } // namespace wasm 823 } // namespace wasm
822 } // namespace internal 824 } // namespace internal
823 } // namespace v8 825 } // namespace v8
OLDNEW
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | src/wasm/wasm-opcodes.h » ('j') | src/wasm/wasm-opcodes.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698