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

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

Issue 1027193002: MIPS64: [turbofan] Support Float64Min and Float64Max. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add bodies of 32 bits visitor()'s. Created 5 years, 7 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/mips64/instruction-codes-mips64.h ('k') | no next file » | 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 594
595 595
596 void InstructionSelector::VisitFloat64Mod(Node* node) { 596 void InstructionSelector::VisitFloat64Mod(Node* node) {
597 Mips64OperandGenerator g(this); 597 Mips64OperandGenerator g(this);
598 Emit(kMips64ModD, g.DefineAsFixed(node, f0), 598 Emit(kMips64ModD, g.DefineAsFixed(node, f0),
599 g.UseFixed(node->InputAt(0), f12), 599 g.UseFixed(node->InputAt(0), f12),
600 g.UseFixed(node->InputAt(1), f14))->MarkAsCall(); 600 g.UseFixed(node->InputAt(1), f14))->MarkAsCall();
601 } 601 }
602 602
603 603
604 void InstructionSelector::VisitFloat32Max(Node* node) { UNREACHABLE(); } 604 void InstructionSelector::VisitFloat32Max(Node* node) {
605 DCHECK(kArchVariant == kMips64r6);
606 VisitRRR(this, kMips64MaxS, node);
607 }
605 608
606 609
607 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } 610 void InstructionSelector::VisitFloat64Max(Node* node) {
611 DCHECK(kArchVariant == kMips64r6);
612 VisitRRR(this, kMips64MaxD, node);
613 }
608 614
609 615
610 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } 616 void InstructionSelector::VisitFloat32Min(Node* node) {
617 DCHECK(kArchVariant == kMips64r6);
618 VisitRRR(this, kMips64MinS, node);
619 }
611 620
612 621
613 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } 622 void InstructionSelector::VisitFloat64Min(Node* node) {
623 DCHECK(kArchVariant == kMips64r6);
624 VisitRRR(this, kMips64MinD, node);
625 }
614 626
615 627
616 void InstructionSelector::VisitFloat32Abs(Node* node) { 628 void InstructionSelector::VisitFloat32Abs(Node* node) {
617 VisitRR(this, kMips64AbsS, node); 629 VisitRR(this, kMips64AbsS, node);
618 } 630 }
619 631
620 632
621 void InstructionSelector::VisitFloat64Abs(Node* node) { 633 void InstructionSelector::VisitFloat64Abs(Node* node) {
622 VisitRR(this, kMips64AbsD, node); 634 VisitRR(this, kMips64AbsD, node);
623 } 635 }
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 Node* left = node->InputAt(0); 1276 Node* left = node->InputAt(0);
1265 Node* right = node->InputAt(1); 1277 Node* right = node->InputAt(1);
1266 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node), 1278 Emit(kMips64Float64InsertHighWord32, g.DefineSameAsFirst(node),
1267 g.UseRegister(left), g.UseRegister(right)); 1279 g.UseRegister(left), g.UseRegister(right));
1268 } 1280 }
1269 1281
1270 1282
1271 // static 1283 // static
1272 MachineOperatorBuilder::Flags 1284 MachineOperatorBuilder::Flags
1273 InstructionSelector::SupportedMachineOperatorFlags() { 1285 InstructionSelector::SupportedMachineOperatorFlags() {
1274 return MachineOperatorBuilder::kFloat64RoundDown | 1286 MachineOperatorBuilder::Flags flags =
1275 MachineOperatorBuilder::kFloat64RoundTruncate; 1287 MachineOperatorBuilder::kFloat64RoundDown |
1288 MachineOperatorBuilder::kFloat64RoundTruncate;
1289 if (kArchVariant == kMips64r6) {
1290 flags |= MachineOperatorBuilder::kFloat32Max |
1291 MachineOperatorBuilder::kFloat32Min |
1292 MachineOperatorBuilder::kFloat64Max |
1293 MachineOperatorBuilder::kFloat64Min;
1294 }
1295 return flags;
1276 } 1296 }
1277 1297
1278 } // namespace compiler 1298 } // namespace compiler
1279 } // namespace internal 1299 } // namespace internal
1280 } // namespace v8 1300 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-codes-mips64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698