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 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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->RoundInt32ToFloat32(); | 699 op = m->RoundInt32ToFloat32(); |
700 break; | 700 break; |
701 case wasm::kExprF32UConvertI32: | 701 case wasm::kExprF32UConvertI32: |
702 op = m->ChangeUint32ToFloat64(); | 702 op = m->RoundUint32ToFloat32(); |
703 input = graph()->NewNode(op, input); | |
704 op = m->TruncateFloat64ToFloat32(); | |
705 break; | 703 break; |
706 case wasm::kExprI32SConvertF32: | 704 case wasm::kExprI32SConvertF32: |
707 return BuildI32SConvertF32(input); | 705 return BuildI32SConvertF32(input); |
708 case wasm::kExprI32UConvertF32: | 706 case wasm::kExprI32UConvertF32: |
709 return BuildI32UConvertF32(input); | 707 return BuildI32UConvertF32(input); |
710 case wasm::kExprF64ConvertF32: | 708 case wasm::kExprF64ConvertF32: |
711 op = m->ChangeFloat32ToFloat64(); | 709 op = m->ChangeFloat32ToFloat64(); |
712 break; | 710 break; |
713 case wasm::kExprF32ReinterpretI32: | 711 case wasm::kExprF32ReinterpretI32: |
714 op = m->BitcastInt32ToFloat32(); | 712 op = m->BitcastInt32ToFloat32(); |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2092 code->Disassemble(buffer.start(), os); | 2090 code->Disassemble(buffer.start(), os); |
2093 } | 2091 } |
2094 #endif | 2092 #endif |
2095 return code; | 2093 return code; |
2096 } | 2094 } |
2097 | 2095 |
2098 | 2096 |
2099 } // namespace compiler | 2097 } // namespace compiler |
2100 } // namespace internal | 2098 } // namespace internal |
2101 } // namespace v8 | 2099 } // namespace v8 |
OLD | NEW |