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

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

Issue 677433002: Add floor, ceil, round (truncate) instructions for ia32, x64 (if SSE4.1) and (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix integer overflow. Created 6 years, 2 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 | Annotate | Revision Log
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 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 } 884 }
885 885
886 886
887 void InstructionSelector::VisitFloat64Sqrt(Node* node) { 887 void InstructionSelector::VisitFloat64Sqrt(Node* node) {
888 Arm64OperandGenerator g(this); 888 Arm64OperandGenerator g(this);
889 Emit(kArm64Float64Sqrt, g.DefineAsRegister(node), 889 Emit(kArm64Float64Sqrt, g.DefineAsRegister(node),
890 g.UseRegister(node->InputAt(0))); 890 g.UseRegister(node->InputAt(0)));
891 } 891 }
892 892
893 893
894 void InstructionSelector::VisitFloat64Floor(Node* node) {
895 Arm64OperandGenerator g(this);
Benedikt Meurer 2014/10/26 12:48:05 How about adding a common VisitRRFloat64 helper?
sigurds 2014/10/28 12:47:22 Done.
896 Emit(kArm64Float64Floor, g.DefineAsRegister(node),
897 g.UseRegister(node->InputAt(0)));
898 }
899
900
901 void InstructionSelector::VisitFloat64Ceil(Node* node) {
902 Arm64OperandGenerator g(this);
903 Emit(kArm64Float64Ceil, g.DefineAsRegister(node),
904 g.UseRegister(node->InputAt(0)));
905 }
906
907
908 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) {
909 Arm64OperandGenerator g(this);
910 Emit(kArm64Float64RoundTruncate, g.DefineAsRegister(node),
911 g.UseRegister(node->InputAt(0)));
912 }
913
914
915 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) {
916 Arm64OperandGenerator g(this);
917 Emit(kArm64Float64RoundTiesAway, g.DefineAsRegister(node),
918 g.UseRegister(node->InputAt(0)));
919 }
920
921
894 void InstructionSelector::VisitCall(Node* node) { 922 void InstructionSelector::VisitCall(Node* node) {
895 Arm64OperandGenerator g(this); 923 Arm64OperandGenerator g(this);
896 CallDescriptor* descriptor = OpParameter<CallDescriptor*>(node); 924 CallDescriptor* descriptor = OpParameter<CallDescriptor*>(node);
897 925
898 FrameStateDescriptor* frame_state_descriptor = NULL; 926 FrameStateDescriptor* frame_state_descriptor = NULL;
899 if (descriptor->NeedsFrameState()) { 927 if (descriptor->NeedsFrameState()) {
900 frame_state_descriptor = 928 frame_state_descriptor =
901 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount())); 929 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount()));
902 } 930 }
903 931
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 1310
1283 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) { 1311 void InstructionSelector::VisitFloat64LessThanOrEqual(Node* node) {
1284 FlagsContinuation cont(kUnorderedLessThanOrEqual, node); 1312 FlagsContinuation cont(kUnorderedLessThanOrEqual, node);
1285 VisitFloat64Compare(this, node, &cont); 1313 VisitFloat64Compare(this, node, &cont);
1286 } 1314 }
1287 1315
1288 1316
1289 // static 1317 // static
1290 MachineOperatorBuilder::Flags 1318 MachineOperatorBuilder::Flags
1291 InstructionSelector::SupportedMachineOperatorFlags() { 1319 InstructionSelector::SupportedMachineOperatorFlags() {
1292 return MachineOperatorBuilder::Flag::kNoFlags; 1320 return MachineOperatorBuilder::Flag::kFloat64Floor |
1321 MachineOperatorBuilder::Flag::kFloat64Ceil |
1322 MachineOperatorBuilder::Flag::kFloat64RoundTruncate |
1323 MachineOperatorBuilder::Flag::kFloat64RoundTiesAway;
1293 } 1324 }
1294 } // namespace compiler 1325 } // namespace compiler
1295 } // namespace internal 1326 } // namespace internal
1296 } // namespace v8 1327 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698