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

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

Issue 1043393002: MIPS: Fix stack claim and store to slot for large sizes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/mips64/code-generator-mips64.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/bits.h" 5 #include "src/base/bits.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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount())); 647 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount()));
648 } 648 }
649 649
650 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); 650 CallBuffer buffer(zone(), descriptor, frame_state_descriptor);
651 651
652 // Compute InstructionOperands for inputs and outputs. 652 // Compute InstructionOperands for inputs and outputs.
653 InitializeCallBuffer(node, &buffer, true, false); 653 InitializeCallBuffer(node, &buffer, true, false);
654 654
655 int push_count = buffer.pushed_nodes.size(); 655 int push_count = buffer.pushed_nodes.size();
656 if (push_count > 0) { 656 if (push_count > 0) {
657 Emit(kMips64StackClaim | MiscField::encode(push_count), g.NoOutput()); 657 Emit(kMips64StackClaim, g.NoOutput(),
658 g.TempImmediate(push_count << kPointerSizeLog2));
658 } 659 }
659 int slot = buffer.pushed_nodes.size() - 1; 660 int slot = buffer.pushed_nodes.size() - 1;
660 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); 661 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend();
661 ++i) { 662 ++i) {
662 Emit(kMips64StoreToStackSlot | MiscField::encode(slot), g.NoOutput(), 663 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(*i),
663 g.UseRegister(*i)); 664 g.TempImmediate(slot << kPointerSizeLog2));
664 slot--; 665 slot--;
665 } 666 }
666 667
667 // Pass label of exception handler block. 668 // Pass label of exception handler block.
668 CallDescriptor::Flags flags = descriptor->flags(); 669 CallDescriptor::Flags flags = descriptor->flags();
669 if (handler != nullptr) { 670 if (handler != nullptr) {
670 flags |= CallDescriptor::kHasExceptionHandler; 671 flags |= CallDescriptor::kHasExceptionHandler;
671 buffer.instruction_args.push_back(g.Label(handler)); 672 buffer.instruction_args.push_back(g.Label(handler));
672 } 673 }
673 674
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 // static 1176 // static
1176 MachineOperatorBuilder::Flags 1177 MachineOperatorBuilder::Flags
1177 InstructionSelector::SupportedMachineOperatorFlags() { 1178 InstructionSelector::SupportedMachineOperatorFlags() {
1178 return MachineOperatorBuilder::kFloat64RoundDown | 1179 return MachineOperatorBuilder::kFloat64RoundDown |
1179 MachineOperatorBuilder::kFloat64RoundTruncate; 1180 MachineOperatorBuilder::kFloat64RoundTruncate;
1180 } 1181 }
1181 1182
1182 } // namespace compiler 1183 } // namespace compiler
1183 } // namespace internal 1184 } // namespace internal
1184 } // namespace v8 1185 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698