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

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

Issue 1225993002: [turbofan] Add TruncationMode for TruncateFloat64ToInt32. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/mips/instruction-selector-mips.cc ('k') | src/compiler/raw-machine-assembler.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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 Emit(kMips64Ext, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)), 532 Emit(kMips64Ext, g.DefineAsRegister(node), g.UseRegister(node->InputAt(0)),
533 g.TempImmediate(0), g.TempImmediate(32)); 533 g.TempImmediate(0), g.TempImmediate(32));
534 } 534 }
535 535
536 536
537 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) { 537 void InstructionSelector::VisitTruncateFloat64ToFloat32(Node* node) {
538 VisitRR(this, kMips64CvtSD, node); 538 VisitRR(this, kMips64CvtSD, node);
539 } 539 }
540 540
541 541
542 void InstructionSelector::VisitTruncateFloat64ToInt32(Node* node) {
543 switch (TruncationModeOf(node->op())) {
544 case TruncationMode::kJavaScript:
545 return VisitRR(this, kArchTruncateDoubleToI, node);
546 case TruncationMode::kRoundToZero:
547 return VisitRR(this, kMips64TruncWD, node);
548 }
549 UNREACHABLE();
550 }
551
552
542 void InstructionSelector::VisitFloat32Add(Node* node) { 553 void InstructionSelector::VisitFloat32Add(Node* node) {
543 VisitRRR(this, kMips64AddS, node); 554 VisitRRR(this, kMips64AddS, node);
544 } 555 }
545 556
546 557
547 void InstructionSelector::VisitFloat64Add(Node* node) { 558 void InstructionSelector::VisitFloat64Add(Node* node) {
548 VisitRRR(this, kMips64AddD, node); 559 VisitRRR(this, kMips64AddD, node);
549 } 560 }
550 561
551 562
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 // static 1311 // static
1301 MachineOperatorBuilder::Flags 1312 MachineOperatorBuilder::Flags
1302 InstructionSelector::SupportedMachineOperatorFlags() { 1313 InstructionSelector::SupportedMachineOperatorFlags() {
1303 return MachineOperatorBuilder::kFloat64RoundDown | 1314 return MachineOperatorBuilder::kFloat64RoundDown |
1304 MachineOperatorBuilder::kFloat64RoundTruncate; 1315 MachineOperatorBuilder::kFloat64RoundTruncate;
1305 } 1316 }
1306 1317
1307 } // namespace compiler 1318 } // namespace compiler
1308 } // namespace internal 1319 } // namespace internal
1309 } // namespace v8 1320 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698