OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |