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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 1507703002: [turbofan] Change TruncateFloat64ToUint64 to TryTruncateFloatToUint64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Added mips64 implementation, fixed nits. Created 5 years 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/arm64/instruction-selector-arm64.cc ('k') | src/compiler/machine-operator.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 case IrOpcode::kChangeFloat64ToInt32: 825 case IrOpcode::kChangeFloat64ToInt32:
826 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node); 826 return MarkAsWord32(node), VisitChangeFloat64ToInt32(node);
827 case IrOpcode::kChangeFloat64ToUint32: 827 case IrOpcode::kChangeFloat64ToUint32:
828 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node); 828 return MarkAsWord32(node), VisitChangeFloat64ToUint32(node);
829 case IrOpcode::kTruncateFloat32ToInt64: 829 case IrOpcode::kTruncateFloat32ToInt64:
830 return MarkAsWord64(node), VisitTruncateFloat32ToInt64(node); 830 return MarkAsWord64(node), VisitTruncateFloat32ToInt64(node);
831 case IrOpcode::kTryTruncateFloat64ToInt64: 831 case IrOpcode::kTryTruncateFloat64ToInt64:
832 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node); 832 return MarkAsWord64(node), VisitTryTruncateFloat64ToInt64(node);
833 case IrOpcode::kTruncateFloat32ToUint64: 833 case IrOpcode::kTruncateFloat32ToUint64:
834 return MarkAsWord64(node), VisitTruncateFloat32ToUint64(node); 834 return MarkAsWord64(node), VisitTruncateFloat32ToUint64(node);
835 case IrOpcode::kTruncateFloat64ToUint64: 835 case IrOpcode::kTryTruncateFloat64ToUint64:
836 return MarkAsWord64(node), VisitTruncateFloat64ToUint64(node); 836 return MarkAsWord64(node), VisitTryTruncateFloat64ToUint64(node);
837 case IrOpcode::kChangeInt32ToInt64: 837 case IrOpcode::kChangeInt32ToInt64:
838 return MarkAsWord64(node), VisitChangeInt32ToInt64(node); 838 return MarkAsWord64(node), VisitChangeInt32ToInt64(node);
839 case IrOpcode::kChangeUint32ToUint64: 839 case IrOpcode::kChangeUint32ToUint64:
840 return MarkAsWord64(node), VisitChangeUint32ToUint64(node); 840 return MarkAsWord64(node), VisitChangeUint32ToUint64(node);
841 case IrOpcode::kTruncateFloat64ToFloat32: 841 case IrOpcode::kTruncateFloat64ToFloat32:
842 return MarkAsFloat32(node), VisitTruncateFloat64ToFloat32(node); 842 return MarkAsFloat32(node), VisitTruncateFloat64ToFloat32(node);
843 case IrOpcode::kTruncateFloat64ToInt32: 843 case IrOpcode::kTruncateFloat64ToInt32:
844 return MarkAsWord32(node), VisitTruncateFloat64ToInt32(node); 844 return MarkAsWord32(node), VisitTruncateFloat64ToInt32(node);
845 case IrOpcode::kTruncateInt64ToInt32: 845 case IrOpcode::kTruncateInt64ToInt32:
846 return MarkAsWord32(node), VisitTruncateInt64ToInt32(node); 846 return MarkAsWord32(node), VisitTruncateInt64ToInt32(node);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) { 1090 void InstructionSelector::VisitTryTruncateFloat64ToInt64(Node* node) {
1091 UNIMPLEMENTED(); 1091 UNIMPLEMENTED();
1092 } 1092 }
1093 1093
1094 1094
1095 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) { 1095 void InstructionSelector::VisitTruncateFloat32ToUint64(Node* node) {
1096 UNIMPLEMENTED(); 1096 UNIMPLEMENTED();
1097 } 1097 }
1098 1098
1099 1099
1100 void InstructionSelector::VisitTruncateFloat64ToUint64(Node* node) { 1100 void InstructionSelector::VisitTryTruncateFloat64ToUint64(Node* node) {
1101 UNIMPLEMENTED(); 1101 UNIMPLEMENTED();
1102 } 1102 }
1103 1103
1104 1104
1105 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) { 1105 void InstructionSelector::VisitTruncateInt64ToInt32(Node* node) {
1106 UNIMPLEMENTED(); 1106 UNIMPLEMENTED();
1107 } 1107 }
1108 1108
1109 1109
1110 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) { 1110 void InstructionSelector::VisitRoundInt64ToFloat32(Node* node) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 } 1202 }
1203 1203
1204 1204
1205 void InstructionSelector::VisitProjection(Node* node) { 1205 void InstructionSelector::VisitProjection(Node* node) {
1206 OperandGenerator g(this); 1206 OperandGenerator g(this);
1207 Node* value = node->InputAt(0); 1207 Node* value = node->InputAt(0);
1208 switch (value->opcode()) { 1208 switch (value->opcode()) {
1209 case IrOpcode::kInt32AddWithOverflow: 1209 case IrOpcode::kInt32AddWithOverflow:
1210 case IrOpcode::kInt32SubWithOverflow: 1210 case IrOpcode::kInt32SubWithOverflow:
1211 case IrOpcode::kTryTruncateFloat64ToInt64: 1211 case IrOpcode::kTryTruncateFloat64ToInt64:
1212 case IrOpcode::kTryTruncateFloat64ToUint64:
1212 if (ProjectionIndexOf(node->op()) == 0u) { 1213 if (ProjectionIndexOf(node->op()) == 0u) {
1213 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value)); 1214 Emit(kArchNop, g.DefineSameAsFirst(node), g.Use(value));
1214 } else { 1215 } else {
1215 DCHECK(ProjectionIndexOf(node->op()) == 1u); 1216 DCHECK(ProjectionIndexOf(node->op()) == 1u);
1216 MarkAsUsed(value); 1217 MarkAsUsed(value);
1217 } 1218 }
1218 break; 1219 break;
1219 default: 1220 default:
1220 break; 1221 break;
1221 } 1222 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1466 return new (instruction_zone()) FrameStateDescriptor( 1467 return new (instruction_zone()) FrameStateDescriptor(
1467 instruction_zone(), state_info.type(), state_info.bailout_id(), 1468 instruction_zone(), state_info.type(), state_info.bailout_id(),
1468 state_info.state_combine(), parameters, locals, stack, 1469 state_info.state_combine(), parameters, locals, stack,
1469 state_info.shared_info(), outer_state); 1470 state_info.shared_info(), outer_state);
1470 } 1471 }
1471 1472
1472 1473
1473 } // namespace compiler 1474 } // namespace compiler
1474 } // namespace internal 1475 } // namespace internal
1475 } // namespace v8 1476 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698