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

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

Issue 1801013002: [wasm] Int64Lowering of F64ReinterpretI64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@wasm-bit-cast
Patch Set: Rebase. Created 4 years, 9 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/int64-lowering.cc ('k') | test/cctest/wasm/test-run-wasm-64.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 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 break; 823 break;
824 // kExprI64SConvertI32: 824 // kExprI64SConvertI32:
825 case wasm::kExprI64SConvertI32: 825 case wasm::kExprI64SConvertI32:
826 op = m->ChangeInt32ToInt64(); 826 op = m->ChangeInt32ToInt64();
827 break; 827 break;
828 // kExprI64UConvertI32: 828 // kExprI64UConvertI32:
829 case wasm::kExprI64UConvertI32: 829 case wasm::kExprI64UConvertI32:
830 op = m->ChangeUint32ToUint64(); 830 op = m->ChangeUint32ToUint64();
831 break; 831 break;
832 // kExprF64ReinterpretI64: 832 // kExprF64ReinterpretI64:
833 case wasm::kExprF64ReinterpretI64:
834 op = m->BitcastInt64ToFloat64();
835 break;
833 // kExprI64ReinterpretF64: 836 // kExprI64ReinterpretF64:
834 case wasm::kExprI64ReinterpretF64: 837 case wasm::kExprI64ReinterpretF64:
835 op = m->BitcastFloat64ToInt64(); 838 op = m->BitcastFloat64ToInt64();
836 break; 839 break;
837 // kExprI64Clz: 840 // kExprI64Clz:
838 // kExprI64Ctz: 841 // kExprI64Ctz:
839 // kExprI64Popcnt: 842 // kExprI64Popcnt:
840 case wasm::kExprI64Popcnt: { 843 case wasm::kExprI64Popcnt: {
841 if (m->Word64Popcnt().IsSupported()) { 844 if (m->Word64Popcnt().IsSupported()) {
842 op = m->Word64Popcnt().op(); 845 op = m->Word64Popcnt().op();
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 case wasm::kExprI64UConvertF32: { 893 case wasm::kExprI64UConvertF32: {
891 return BuildI64UConvertF32(input); 894 return BuildI64UConvertF32(input);
892 } 895 }
893 // kExprI64UConvertF64: 896 // kExprI64UConvertF64:
894 case wasm::kExprI64UConvertF64: { 897 case wasm::kExprI64UConvertF64: {
895 return BuildI64UConvertF64(input); 898 return BuildI64UConvertF64(input);
896 } 899 }
897 #if WASM_64 900 #if WASM_64
898 // Opcodes only supported on 64-bit platforms. 901 // Opcodes only supported on 64-bit platforms.
899 // TODO(titzer): query the machine operator builder here instead of #ifdef. 902 // TODO(titzer): query the machine operator builder here instead of #ifdef.
900 case wasm::kExprF64ReinterpretI64:
901 op = m->BitcastInt64ToFloat64();
902 break;
903 case wasm::kExprI64Clz: 903 case wasm::kExprI64Clz:
904 op = m->Word64Clz(); 904 op = m->Word64Clz();
905 break; 905 break;
906 case wasm::kExprI64Ctz: { 906 case wasm::kExprI64Ctz: {
907 if (m->Word64Ctz().IsSupported()) { 907 if (m->Word64Ctz().IsSupported()) {
908 op = m->Word64Ctz().op(); 908 op = m->Word64Ctz().op();
909 break; 909 break;
910 } else if (m->Word64ReverseBits().IsSupported()) { 910 } else if (m->Word64ReverseBits().IsSupported()) {
911 Node* reversed = graph()->NewNode(m->Word64ReverseBits().op(), input); 911 Node* reversed = graph()->NewNode(m->Word64ReverseBits().op(), input);
912 Node* result = graph()->NewNode(m->Word64Clz(), reversed); 912 Node* result = graph()->NewNode(m->Word64Clz(), reversed);
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2649 static_cast<int>(function.code_end_offset - function.code_start_offset), 2649 static_cast<int>(function.code_end_offset - function.code_start_offset),
2650 decode_ms, static_cast<int>(graph.NodeCount()), compile_ms); 2650 decode_ms, static_cast<int>(graph.NodeCount()), compile_ms);
2651 } 2651 }
2652 return code; 2652 return code;
2653 } 2653 }
2654 2654
2655 2655
2656 } // namespace compiler 2656 } // namespace compiler
2657 } // namespace internal 2657 } // namespace internal
2658 } // namespace v8 2658 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/int64-lowering.cc ('k') | test/cctest/wasm/test-run-wasm-64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698