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

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

Issue 1589363002: [turbofan] Add the RoundInt32ToFloat32 operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/code-generator-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/platform.h" 9 #include "src/base/platform/platform.h"
10 10
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 case wasm::kExprF32ConvertF64: 689 case wasm::kExprF32ConvertF64:
690 op = m->TruncateFloat64ToFloat32(); 690 op = m->TruncateFloat64ToFloat32();
691 break; 691 break;
692 case wasm::kExprF64SConvertI32: 692 case wasm::kExprF64SConvertI32:
693 op = m->ChangeInt32ToFloat64(); 693 op = m->ChangeInt32ToFloat64();
694 break; 694 break;
695 case wasm::kExprF64UConvertI32: 695 case wasm::kExprF64UConvertI32:
696 op = m->ChangeUint32ToFloat64(); 696 op = m->ChangeUint32ToFloat64();
697 break; 697 break;
698 case wasm::kExprF32SConvertI32: 698 case wasm::kExprF32SConvertI32:
699 op = m->ChangeInt32ToFloat64(); // TODO(titzer): two conversions 699 op = m->RoundInt32ToFloat32();
700 input = graph()->NewNode(op, input);
701 op = m->TruncateFloat64ToFloat32();
702 break; 700 break;
703 case wasm::kExprF32UConvertI32: 701 case wasm::kExprF32UConvertI32:
704 op = m->ChangeUint32ToFloat64(); 702 op = m->ChangeUint32ToFloat64();
705 input = graph()->NewNode(op, input); 703 input = graph()->NewNode(op, input);
706 op = m->TruncateFloat64ToFloat32(); 704 op = m->TruncateFloat64ToFloat32();
707 break; 705 break;
708 case wasm::kExprI32SConvertF32: 706 case wasm::kExprI32SConvertF32:
709 return BuildI32SConvertF32(input); 707 return BuildI32SConvertF32(input);
710 case wasm::kExprI32UConvertF32: 708 case wasm::kExprI32UConvertF32:
711 return BuildI32UConvertF32(input); 709 return BuildI32UConvertF32(input);
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 code->Disassemble(buffer.start(), os); 2020 code->Disassemble(buffer.start(), os);
2023 } 2021 }
2024 #endif 2022 #endif
2025 return code; 2023 return code;
2026 } 2024 }
2027 2025
2028 2026
2029 } // namespace compiler 2027 } // namespace compiler
2030 } // namespace internal 2028 } // namespace internal
2031 } // namespace v8 2029 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698