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

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

Issue 1534593004: [turbofan] Pass type information of arguments to EmitPrepareArguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle float32 and float64 differently. Created 5 years 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 | « no previous file | src/compiler/arm64/instruction-selector-arm64.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/base/bits.h" 6 #include "src/base/bits.h"
7 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 10
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { 1151 void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) {
1152 VisitRR(this, kArmVrintnF32, node); 1152 VisitRR(this, kArmVrintnF32, node);
1153 } 1153 }
1154 1154
1155 1155
1156 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { 1156 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) {
1157 VisitRR(this, kArmVrintnF64, node); 1157 VisitRR(this, kArmVrintnF64, node);
1158 } 1158 }
1159 1159
1160 1160
1161 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, 1161 void InstructionSelector::EmitPrepareArguments(
1162 const CallDescriptor* descriptor, 1162 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor,
1163 Node* node) { 1163 Node* node) {
1164 ArmOperandGenerator g(this); 1164 ArmOperandGenerator g(this);
1165 1165
1166 // Prepare for C function call. 1166 // Prepare for C function call.
1167 if (descriptor->IsCFunctionCall()) { 1167 if (descriptor->IsCFunctionCall()) {
1168 Emit(kArchPrepareCallCFunction | 1168 Emit(kArchPrepareCallCFunction |
1169 MiscField::encode(static_cast<int>(descriptor->CParameterCount())), 1169 MiscField::encode(static_cast<int>(descriptor->CParameterCount())),
1170 0, nullptr, 0, nullptr); 1170 0, nullptr, 0, nullptr);
1171 1171
1172 // Poke any stack arguments. 1172 // Poke any stack arguments.
1173 for (size_t n = 0; n < arguments->size(); ++n) { 1173 for (size_t n = 0; n < arguments->size(); ++n) {
1174 if (Node* input = (*arguments)[n]) { 1174 PushParameter input = (*arguments)[n];
1175 if (input.node()) {
1175 int slot = static_cast<int>(n); 1176 int slot = static_cast<int>(n);
1176 Emit(kArmPoke | MiscField::encode(slot), g.NoOutput(), 1177 Emit(kArmPoke | MiscField::encode(slot), g.NoOutput(),
1177 g.UseRegister(input)); 1178 g.UseRegister(input.node()));
1178 } 1179 }
1179 } 1180 }
1180 } else { 1181 } else {
1181 // Push any stack arguments. 1182 // Push any stack arguments.
1182 for (Node* input : base::Reversed(*arguments)) { 1183 for (PushParameter input : base::Reversed(*arguments)) {
1183 // Skip any alignment holes in pushed nodes. 1184 // Skip any alignment holes in pushed nodes.
1184 if (input == nullptr) continue; 1185 if (input.node() == nullptr) continue;
1185 Emit(kArmPush, g.NoOutput(), g.UseRegister(input)); 1186 Emit(kArmPush, g.NoOutput(), g.UseRegister(input.node()));
1186 } 1187 }
1187 } 1188 }
1188 } 1189 }
1189 1190
1190 1191
1191 bool InstructionSelector::IsTailCallAddressImmediate() { return false; } 1192 bool InstructionSelector::IsTailCallAddressImmediate() { return false; }
1192 1193
1193 1194
1194 namespace { 1195 namespace {
1195 1196
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 MachineOperatorBuilder::kFloat64RoundTiesAway | 1593 MachineOperatorBuilder::kFloat64RoundTiesAway |
1593 MachineOperatorBuilder::kFloat32RoundTiesEven | 1594 MachineOperatorBuilder::kFloat32RoundTiesEven |
1594 MachineOperatorBuilder::kFloat64RoundTiesEven; 1595 MachineOperatorBuilder::kFloat64RoundTiesEven;
1595 } 1596 }
1596 return flags; 1597 return flags;
1597 } 1598 }
1598 1599
1599 } // namespace compiler 1600 } // namespace compiler
1600 } // namespace internal 1601 } // namespace internal
1601 } // namespace v8 1602 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm64/instruction-selector-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698