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

Side by Side Diff: src/compiler/wasm-compiler.cc

Issue 2011303002: [arm] [arm64] Add optional operators Float32Neg and Float64Neg. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/compiler/wasm-compiler.h" 5 #include "src/compiler/wasm-compiler.h"
6 6
7 #include "src/isolate-inl.h" 7 #include "src/isolate-inl.h"
8 8
9 #include "src/base/platform/elapsed-timer.h" 9 #include "src/base/platform/elapsed-timer.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 wasm::WasmCodePosition position) { 638 wasm::WasmCodePosition position) {
639 const Operator* op; 639 const Operator* op;
640 MachineOperatorBuilder* m = jsgraph()->machine(); 640 MachineOperatorBuilder* m = jsgraph()->machine();
641 switch (opcode) { 641 switch (opcode) {
642 case wasm::kExprI32Eqz: 642 case wasm::kExprI32Eqz:
643 op = m->Word32Equal(); 643 op = m->Word32Equal();
644 return graph()->NewNode(op, input, jsgraph()->Int32Constant(0)); 644 return graph()->NewNode(op, input, jsgraph()->Int32Constant(0));
645 case wasm::kExprF32Abs: 645 case wasm::kExprF32Abs:
646 op = m->Float32Abs(); 646 op = m->Float32Abs();
647 break; 647 break;
648 case wasm::kExprF32Neg: 648 case wasm::kExprF32Neg: {
649 return BuildF32Neg(input); 649 if (m->Float32Neg().IsSupported()) {
650 op = m->Float32Neg().op();
651 break;
652 } else {
653 return BuildF32Neg(input);
654 }
655 }
650 case wasm::kExprF32Sqrt: 656 case wasm::kExprF32Sqrt:
651 op = m->Float32Sqrt(); 657 op = m->Float32Sqrt();
652 break; 658 break;
653 case wasm::kExprF64Abs: 659 case wasm::kExprF64Abs:
654 op = m->Float64Abs(); 660 op = m->Float64Abs();
655 break; 661 break;
656 case wasm::kExprF64Neg: 662 case wasm::kExprF64Neg: {
657 return BuildF64Neg(input); 663 if (m->Float64Neg().IsSupported()) {
664 op = m->Float64Neg().op();
665 break;
666 } else {
667 return BuildF64Neg(input);
668 }
669 }
658 case wasm::kExprF64Sqrt: 670 case wasm::kExprF64Sqrt:
659 op = m->Float64Sqrt(); 671 op = m->Float64Sqrt();
660 break; 672 break;
661 case wasm::kExprI32SConvertF64: 673 case wasm::kExprI32SConvertF64:
662 return BuildI32SConvertF64(input, position); 674 return BuildI32SConvertF64(input, position);
663 case wasm::kExprI32UConvertF64: 675 case wasm::kExprI32UConvertF64:
664 return BuildI32UConvertF64(input, position); 676 return BuildI32UConvertF64(input, position);
665 case wasm::kExprI32AsmjsSConvertF64: 677 case wasm::kExprI32AsmjsSConvertF64:
666 return BuildI32AsmjsSConvertF64(input); 678 return BuildI32AsmjsSConvertF64(input);
667 case wasm::kExprI32AsmjsUConvertF64: 679 case wasm::kExprI32AsmjsUConvertF64:
(...skipping 2635 matching lines...) Expand 10 before | Expand all | Expand 10 after
3303 function_->code_start_offset), 3315 function_->code_start_offset),
3304 compile_ms); 3316 compile_ms);
3305 } 3317 }
3306 3318
3307 return code; 3319 return code;
3308 } 3320 }
3309 3321
3310 } // namespace compiler 3322 } // namespace compiler
3311 } // namespace internal 3323 } // namespace internal
3312 } // namespace v8 3324 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698