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

Side by Side Diff: src/compiler/arm64/instruction-selector-arm64.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 | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ia32/code-generator-ia32.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/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 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) { 1567 void InstructionSelector::VisitFloat32RoundTiesEven(Node* node) {
1568 VisitRR(this, kArm64Float32RoundTiesEven, node); 1568 VisitRR(this, kArm64Float32RoundTiesEven, node);
1569 } 1569 }
1570 1570
1571 1571
1572 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) { 1572 void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) {
1573 VisitRR(this, kArm64Float64RoundTiesEven, node); 1573 VisitRR(this, kArm64Float64RoundTiesEven, node);
1574 } 1574 }
1575 1575
1576 1576
1577 void InstructionSelector::EmitPrepareArguments(NodeVector* arguments, 1577 void InstructionSelector::EmitPrepareArguments(
1578 const CallDescriptor* descriptor, 1578 ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor,
1579 Node* node) { 1579 Node* node) {
1580 Arm64OperandGenerator g(this); 1580 Arm64OperandGenerator g(this);
1581 1581
1582 // Push the arguments to the stack. 1582 // Push the arguments to the stack.
1583 int aligned_push_count = static_cast<int>(arguments->size()); 1583 int aligned_push_count = static_cast<int>(arguments->size());
1584 1584
1585 bool pushed_count_uneven = aligned_push_count & 1; 1585 bool pushed_count_uneven = aligned_push_count & 1;
1586 int claim_count = aligned_push_count; 1586 int claim_count = aligned_push_count;
1587 if (pushed_count_uneven && descriptor->UseNativeStack()) { 1587 if (pushed_count_uneven && descriptor->UseNativeStack()) {
1588 // We can only claim for an even number of call arguments when we use the 1588 // We can only claim for an even number of call arguments when we use the
1589 // native stack. 1589 // native stack.
1590 claim_count++; 1590 claim_count++;
1591 } 1591 }
1592 // TODO(dcarney): claim and poke probably take small immediates, 1592 // TODO(dcarney): claim and poke probably take small immediates,
1593 // loop here or whatever. 1593 // loop here or whatever.
1594 // Bump the stack pointer(s). 1594 // Bump the stack pointer(s).
1595 if (aligned_push_count > 0) { 1595 if (aligned_push_count > 0) {
1596 // TODO(dcarney): it would be better to bump the csp here only 1596 // TODO(dcarney): it would be better to bump the csp here only
1597 // and emit paired stores with increment for non c frames. 1597 // and emit paired stores with increment for non c frames.
1598 Emit(kArm64ClaimForCallArguments, g.NoOutput(), 1598 Emit(kArm64ClaimForCallArguments, g.NoOutput(),
1599 g.TempImmediate(claim_count)); 1599 g.TempImmediate(claim_count));
1600 } 1600 }
1601 1601
1602 // Move arguments to the stack. 1602 // Move arguments to the stack.
1603 int slot = aligned_push_count - 1; 1603 int slot = aligned_push_count - 1;
1604 while (slot >= 0) { 1604 while (slot >= 0) {
1605 Emit(kArm64Poke, g.NoOutput(), g.UseRegister((*arguments)[slot]), 1605 Emit(kArm64Poke, g.NoOutput(), g.UseRegister((*arguments)[slot].node()),
1606 g.TempImmediate(slot)); 1606 g.TempImmediate(slot));
1607 slot--; 1607 slot--;
1608 // TODO(ahaas): Poke arguments in pairs if two subsequent arguments have the 1608 // TODO(ahaas): Poke arguments in pairs if two subsequent arguments have the
1609 // same type. 1609 // same type.
1610 // Emit(kArm64PokePair, g.NoOutput(), g.UseRegister((*arguments)[slot]), 1610 // Emit(kArm64PokePair, g.NoOutput(), g.UseRegister((*arguments)[slot]),
1611 // g.UseRegister((*arguments)[slot - 1]), g.TempImmediate(slot)); 1611 // g.UseRegister((*arguments)[slot - 1]), g.TempImmediate(slot));
1612 // slot -= 2; 1612 // slot -= 2;
1613 } 1613 }
1614 } 1614 }
1615 1615
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
2156 MachineOperatorBuilder::kFloat32RoundTiesEven | 2156 MachineOperatorBuilder::kFloat32RoundTiesEven |
2157 MachineOperatorBuilder::kFloat64RoundTiesEven | 2157 MachineOperatorBuilder::kFloat64RoundTiesEven |
2158 MachineOperatorBuilder::kWord32ShiftIsSafe | 2158 MachineOperatorBuilder::kWord32ShiftIsSafe |
2159 MachineOperatorBuilder::kInt32DivIsSafe | 2159 MachineOperatorBuilder::kInt32DivIsSafe |
2160 MachineOperatorBuilder::kUint32DivIsSafe; 2160 MachineOperatorBuilder::kUint32DivIsSafe;
2161 } 2161 }
2162 2162
2163 } // namespace compiler 2163 } // namespace compiler
2164 } // namespace internal 2164 } // namespace internal
2165 } // namespace v8 2165 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/instruction-selector-arm.cc ('k') | src/compiler/ia32/code-generator-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698