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

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

Issue 2094953002: X87: [builtins] Introduce proper Float64Log1p operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/x87/code-generator-x87.cc ('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/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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 Emit(kX87Float32Abs, g.DefineAsFixed(node, stX_0), 0, nullptr); 1002 Emit(kX87Float32Abs, g.DefineAsFixed(node, stX_0), 0, nullptr);
1003 } 1003 }
1004 1004
1005 1005
1006 void InstructionSelector::VisitFloat64Abs(Node* node) { 1006 void InstructionSelector::VisitFloat64Abs(Node* node) {
1007 X87OperandGenerator g(this); 1007 X87OperandGenerator g(this);
1008 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); 1008 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0)));
1009 Emit(kX87Float64Abs, g.DefineAsFixed(node, stX_0), 0, nullptr); 1009 Emit(kX87Float64Abs, g.DefineAsFixed(node, stX_0), 0, nullptr);
1010 } 1010 }
1011 1011
1012 void InstructionSelector::VisitFloat64Log(Node* node) {
1013 X87OperandGenerator g(this);
1014 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0)));
1015 Emit(kIeee754Float64Log, g.DefineAsFixed(node, stX_0), 0, nullptr)
1016 ->MarkAsCall();
1017 }
1018
1019 void InstructionSelector::VisitFloat32Sqrt(Node* node) { 1012 void InstructionSelector::VisitFloat32Sqrt(Node* node) {
1020 X87OperandGenerator g(this); 1013 X87OperandGenerator g(this);
1021 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0))); 1014 Emit(kX87PushFloat32, g.NoOutput(), g.Use(node->InputAt(0)));
1022 Emit(kX87Float32Sqrt, g.DefineAsFixed(node, stX_0), 0, nullptr); 1015 Emit(kX87Float32Sqrt, g.DefineAsFixed(node, stX_0), 0, nullptr);
1023 } 1016 }
1024 1017
1025 1018
1026 void InstructionSelector::VisitFloat64Sqrt(Node* node) { 1019 void InstructionSelector::VisitFloat64Sqrt(Node* node) {
1027 X87OperandGenerator g(this); 1020 X87OperandGenerator g(this);
1028 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0))); 1021 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0)));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { 1080 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) {
1088 X87OperandGenerator g(this); 1081 X87OperandGenerator g(this);
1089 Emit(kX87Float64Round | MiscField::encode(kRoundToNearest), 1082 Emit(kX87Float64Round | MiscField::encode(kRoundToNearest),
1090 g.UseFixed(node, stX_0), g.Use(node->InputAt(0))); 1083 g.UseFixed(node, stX_0), g.Use(node->InputAt(0)));
1091 } 1084 }
1092 1085
1093 void InstructionSelector::VisitFloat32Neg(Node* node) { UNREACHABLE(); } 1086 void InstructionSelector::VisitFloat32Neg(Node* node) { UNREACHABLE(); }
1094 1087
1095 void InstructionSelector::VisitFloat64Neg(Node* node) { UNREACHABLE(); } 1088 void InstructionSelector::VisitFloat64Neg(Node* node) { UNREACHABLE(); }
1096 1089
1090 void InstructionSelector::VisitFloat64Ieee754Unop(Node* node,
1091 InstructionCode opcode) {
1092 X87OperandGenerator g(this);
1093 Emit(kX87PushFloat64, g.NoOutput(), g.Use(node->InputAt(0)));
1094 Emit(opcode, g.DefineAsFixed(node, stX_0), 0, nullptr)->MarkAsCall();
1095 }
1096
1097 void InstructionSelector::EmitPrepareArguments( 1097 void InstructionSelector::EmitPrepareArguments(
1098 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor, 1098 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor,
1099 Node* node) { 1099 Node* node) {
1100 X87OperandGenerator g(this); 1100 X87OperandGenerator g(this);
1101 1101
1102 // Prepare for C function call. 1102 // Prepare for C function call.
1103 if (descriptor->IsCFunctionCall()) { 1103 if (descriptor->IsCFunctionCall()) {
1104 InstructionOperand temps[] = {g.TempRegister()}; 1104 InstructionOperand temps[] = {g.TempRegister()};
1105 size_t const temp_count = arraysize(temps); 1105 size_t const temp_count = arraysize(temps);
1106 Emit(kArchPrepareCallCFunction | 1106 Emit(kArchPrepareCallCFunction |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 // static 1695 // static
1696 MachineOperatorBuilder::AlignmentRequirements 1696 MachineOperatorBuilder::AlignmentRequirements
1697 InstructionSelector::AlignmentRequirements() { 1697 InstructionSelector::AlignmentRequirements() {
1698 return MachineOperatorBuilder::AlignmentRequirements:: 1698 return MachineOperatorBuilder::AlignmentRequirements::
1699 FullUnalignedAccessSupport(); 1699 FullUnalignedAccessSupport();
1700 } 1700 }
1701 1701
1702 } // namespace compiler 1702 } // namespace compiler
1703 } // namespace internal 1703 } // namespace internal
1704 } // namespace v8 1704 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x87/code-generator-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698