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

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

Issue 1440293002: [turbofan] Added the optional Float64RoundTiesEven operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@f64roundup
Patch Set: Disabled F64RoundTiesEven on mips32 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
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction-selector.cc » ('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/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) { 864 void InstructionSelector::VisitFloat64RoundTruncate(Node* node) {
865 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero)); 865 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToZero));
866 } 866 }
867 867
868 868
869 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) { 869 void InstructionSelector::VisitFloat64RoundTiesAway(Node* node) {
870 UNREACHABLE(); 870 UNREACHABLE();
871 } 871 }
872 872
873 873
874 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) {
875 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest));
876 }
877
878
874 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, 879 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments,
875 const CallDescriptor* descriptor, 880 const CallDescriptor* descriptor,
876 Node* node) { 881 Node* node) {
877 IA32OperandGenerator g(this); 882 IA32OperandGenerator g(this);
878 883
879 // Prepare for C function call. 884 // Prepare for C function call.
880 if (descriptor->IsCFunctionCall()) { 885 if (descriptor->IsCFunctionCall()) {
881 InstructionOperand temps[] = {g.TempRegister()}; 886 InstructionOperand temps[] = {g.TempRegister()};
882 size_t const temp_count = arraysize(temps); 887 size_t const temp_count = arraysize(temps);
883 Emit(kArchPrepareCallCFunction | 888 Emit(kArchPrepareCallCFunction |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 MachineOperatorBuilder::kFloat64Max | 1279 MachineOperatorBuilder::kFloat64Max |
1275 MachineOperatorBuilder::kFloat64Min | 1280 MachineOperatorBuilder::kFloat64Min |
1276 MachineOperatorBuilder::kWord32ShiftIsSafe | 1281 MachineOperatorBuilder::kWord32ShiftIsSafe |
1277 MachineOperatorBuilder::kWord32Ctz; 1282 MachineOperatorBuilder::kWord32Ctz;
1278 if (CpuFeatures::IsSupported(POPCNT)) { 1283 if (CpuFeatures::IsSupported(POPCNT)) {
1279 flags |= MachineOperatorBuilder::kWord32Popcnt; 1284 flags |= MachineOperatorBuilder::kWord32Popcnt;
1280 } 1285 }
1281 if (CpuFeatures::IsSupported(SSE4_1)) { 1286 if (CpuFeatures::IsSupported(SSE4_1)) {
1282 flags |= MachineOperatorBuilder::kFloat64RoundDown | 1287 flags |= MachineOperatorBuilder::kFloat64RoundDown |
1283 MachineOperatorBuilder::kFloat64RoundUp | 1288 MachineOperatorBuilder::kFloat64RoundUp |
1284 MachineOperatorBuilder::kFloat64RoundTruncate; 1289 MachineOperatorBuilder::kFloat64RoundTruncate |
1290 MachineOperatorBuilder::kFloat64RoundTiesEven;
1285 } 1291 }
1286 return flags; 1292 return flags;
1287 } 1293 }
1288 1294
1289 } // namespace compiler 1295 } // namespace compiler
1290 } // namespace internal 1296 } // namespace internal
1291 } // namespace v8 1297 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698