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

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

Issue 2060743002: [builtins] Introduce proper Float64Log1p operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@Math_Log
Patch Set: REBASE Created 4 years, 6 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
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/base/adapters.h" 7 #include "src/base/adapters.h"
8 #include "src/compiler/instruction-selector-impl.h" 8 #include "src/compiler/instruction-selector-impl.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 1348
1349 void InstructionSelector::VisitFloat64Min(Node* node) { 1349 void InstructionSelector::VisitFloat64Min(Node* node) {
1350 VisitFloatBinop(this, node, kAVXFloat64Min, kSSEFloat64Min); 1350 VisitFloatBinop(this, node, kAVXFloat64Min, kSSEFloat64Min);
1351 } 1351 }
1352 1352
1353 1353
1354 void InstructionSelector::VisitFloat64Abs(Node* node) { 1354 void InstructionSelector::VisitFloat64Abs(Node* node) {
1355 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat64Abs, kSSEFloat64Abs); 1355 VisitFloatUnop(this, node, node->InputAt(0), kAVXFloat64Abs, kSSEFloat64Abs);
1356 } 1356 }
1357 1357
1358 void InstructionSelector::VisitFloat64Log(Node* node) {
1359 X64OperandGenerator g(this);
1360 Emit(kIeee754Float64Log, g.DefineAsFixed(node, xmm0),
1361 g.UseFixed(node->InputAt(0), xmm0))
1362 ->MarkAsCall();
1363 }
1364
1365 void InstructionSelector::VisitFloat64Sqrt(Node* node) { 1358 void InstructionSelector::VisitFloat64Sqrt(Node* node) {
1366 VisitRO(this, node, kSSEFloat64Sqrt); 1359 VisitRO(this, node, kSSEFloat64Sqrt);
1367 } 1360 }
1368 1361
1369 1362
1370 void InstructionSelector::VisitFloat32RoundDown(Node* node) { 1363 void InstructionSelector::VisitFloat32RoundDown(Node* node) {
1371 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundDown)); 1364 VisitRR(this, node, kSSEFloat32Round | MiscField::encode(kRoundDown));
1372 } 1365 }
1373 1366
1374 1367
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 1401
1409 1402
1410 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { 1403 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) {
1411 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest)); 1404 VisitRR(this, node, kSSEFloat64Round | MiscField::encode(kRoundToNearest));
1412 } 1405 }
1413 1406
1414 void InstructionSelector::VisitFloat32Neg(Node* node) { UNREACHABLE(); } 1407 void InstructionSelector::VisitFloat32Neg(Node* node) { UNREACHABLE(); }
1415 1408
1416 void InstructionSelector::VisitFloat64Neg(Node* node) { UNREACHABLE(); } 1409 void InstructionSelector::VisitFloat64Neg(Node* node) { UNREACHABLE(); }
1417 1410
1411 void InstructionSelector::VisitFloat64Ieee754Unop(Node* node,
1412 InstructionCode opcode) {
1413 X64OperandGenerator g(this);
1414 Emit(opcode, g.DefineAsFixed(node, xmm0), g.UseFixed(node->InputAt(0), xmm0))
1415 ->MarkAsCall();
1416 }
1417
1418 void InstructionSelector::EmitPrepareArguments( 1418 void InstructionSelector::EmitPrepareArguments(
1419 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, 1419 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor,
1420 Node* node) { 1420 Node* node) {
1421 X64OperandGenerator g(this); 1421 X64OperandGenerator g(this);
1422 1422
1423 // Prepare for C function call. 1423 // Prepare for C function call.
1424 if (descriptor->IsCFunctionCall()) { 1424 if (descriptor->IsCFunctionCall()) {
1425 Emit(kArchPrepareCallCFunction | 1425 Emit(kArchPrepareCallCFunction |
1426 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), 1426 MiscField::encode(static_cast<int>(descriptor->CParameterCount())),
1427 0, nullptr, 0, nullptr); 1427 0, nullptr, 0, nullptr);
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 // static 2122 // static
2123 MachineOperatorBuilder::AlignmentRequirements 2123 MachineOperatorBuilder::AlignmentRequirements
2124 InstructionSelector::AlignmentRequirements() { 2124 InstructionSelector::AlignmentRequirements() {
2125 return MachineOperatorBuilder::AlignmentRequirements:: 2125 return MachineOperatorBuilder::AlignmentRequirements::
2126 FullUnalignedAccessSupport(); 2126 FullUnalignedAccessSupport();
2127 } 2127 }
2128 2128
2129 } // namespace compiler 2129 } // namespace compiler
2130 } // namespace internal 2130 } // namespace internal
2131 } // namespace v8 2131 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698