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

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

Issue 1360603003: [arm64] Implement Float(32|64)(Min|Max) using fcsel. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: More local solution, as suggested. Created 5 years, 1 month 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
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-impl.h" 5 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 6 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 1362
1363 1363
1364 void InstructionSelector::VisitFloat64Mod(Node* node) { 1364 void InstructionSelector::VisitFloat64Mod(Node* node) {
1365 Arm64OperandGenerator g(this); 1365 Arm64OperandGenerator g(this);
1366 Emit(kArm64Float64Mod, g.DefineAsFixed(node, d0), 1366 Emit(kArm64Float64Mod, g.DefineAsFixed(node, d0),
1367 g.UseFixed(node->InputAt(0), d0), 1367 g.UseFixed(node->InputAt(0), d0),
1368 g.UseFixed(node->InputAt(1), d1))->MarkAsCall(); 1368 g.UseFixed(node->InputAt(1), d1))->MarkAsCall();
1369 } 1369 }
1370 1370
1371 1371
1372 void InstructionSelector::VisitFloat32Max(Node* node) { UNREACHABLE(); } 1372 void InstructionSelector::VisitFloat32Max(Node* node) {
1373 VisitRRR(this, kArm64Float32TernaryMax, node);
1374 }
1373 1375
1374 1376
1375 void InstructionSelector::VisitFloat64Max(Node* node) { UNREACHABLE(); } 1377 void InstructionSelector::VisitFloat64Max(Node* node) {
1378 VisitRRR(this, kArm64Float64TernaryMax, node);
1379 }
1376 1380
1377 1381
1378 void InstructionSelector::VisitFloat32Min(Node* node) { UNREACHABLE(); } 1382 void InstructionSelector::VisitFloat32Min(Node* node) {
1383 VisitRRR(this, kArm64Float32TernaryMin, node);
1384 }
1379 1385
1380 1386
1381 void InstructionSelector::VisitFloat64Min(Node* node) { UNREACHABLE(); } 1387 void InstructionSelector::VisitFloat64Min(Node* node) {
1388 VisitRRR(this, kArm64Float64TernaryMin, node);
1389 }
1382 1390
1383 1391
1384 void InstructionSelector::VisitFloat32Abs(Node* node) { 1392 void InstructionSelector::VisitFloat32Abs(Node* node) {
1385 VisitRR(this, kArm64Float32Abs, node); 1393 VisitRR(this, kArm64Float32Abs, node);
1386 } 1394 }
1387 1395
1388 1396
1389 void InstructionSelector::VisitFloat64Abs(Node* node) { 1397 void InstructionSelector::VisitFloat64Abs(Node* node) {
1390 VisitRR(this, kArm64Float64Abs, node); 1398 VisitRR(this, kArm64Float64Abs, node);
1391 } 1399 }
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 return; 2062 return;
2055 } 2063 }
2056 Emit(kArm64Float64InsertHighWord32, g.DefineAsRegister(node), 2064 Emit(kArm64Float64InsertHighWord32, g.DefineAsRegister(node),
2057 g.UseRegister(left), g.UseRegister(right)); 2065 g.UseRegister(left), g.UseRegister(right));
2058 } 2066 }
2059 2067
2060 2068
2061 // static 2069 // static
2062 MachineOperatorBuilder::Flags 2070 MachineOperatorBuilder::Flags
2063 InstructionSelector::SupportedMachineOperatorFlags() { 2071 InstructionSelector::SupportedMachineOperatorFlags() {
2064 return MachineOperatorBuilder::kFloat64RoundDown | 2072 return MachineOperatorBuilder::kFloat32Max |
2073 MachineOperatorBuilder::kFloat32Min |
2074 MachineOperatorBuilder::kFloat64Max |
2075 MachineOperatorBuilder::kFloat64Min |
2076 MachineOperatorBuilder::kFloat64RoundDown |
2065 MachineOperatorBuilder::kFloat64RoundTruncate | 2077 MachineOperatorBuilder::kFloat64RoundTruncate |
2066 MachineOperatorBuilder::kFloat64RoundTiesAway | 2078 MachineOperatorBuilder::kFloat64RoundTiesAway |
2067 MachineOperatorBuilder::kWord32ShiftIsSafe | 2079 MachineOperatorBuilder::kWord32ShiftIsSafe |
2068 MachineOperatorBuilder::kInt32DivIsSafe | 2080 MachineOperatorBuilder::kInt32DivIsSafe |
2069 MachineOperatorBuilder::kUint32DivIsSafe; 2081 MachineOperatorBuilder::kUint32DivIsSafe;
2070 } 2082 }
2071 2083
2072 } // namespace compiler 2084 } // namespace compiler
2073 } // namespace internal 2085 } // namespace internal
2074 } // namespace v8 2086 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698