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

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

Issue 1098863003: Import Reversed adapter from Chromium and use it in v8. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed feedback. Rebased. 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
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/bits.h" 6 #include "src/base/bits.h"
6 #include "src/compiler/instruction-selector-impl.h" 7 #include "src/compiler/instruction-selector-impl.h"
7 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
9 10
10 namespace v8 { 11 namespace v8 {
11 namespace internal { 12 namespace internal {
12 namespace compiler { 13 namespace compiler {
13 14
14 #define TRACE_UNIMPL() \ 15 #define TRACE_UNIMPL() \
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 662
662 // Compute InstructionOperands for inputs and outputs. 663 // Compute InstructionOperands for inputs and outputs.
663 InitializeCallBuffer(node, &buffer, true, false); 664 InitializeCallBuffer(node, &buffer, true, false);
664 665
665 int push_count = buffer.pushed_nodes.size(); 666 int push_count = buffer.pushed_nodes.size();
666 if (push_count > 0) { 667 if (push_count > 0) {
667 Emit(kMips64StackClaim, g.NoOutput(), 668 Emit(kMips64StackClaim, g.NoOutput(),
668 g.TempImmediate(push_count << kPointerSizeLog2)); 669 g.TempImmediate(push_count << kPointerSizeLog2));
669 } 670 }
670 int slot = buffer.pushed_nodes.size() - 1; 671 int slot = buffer.pushed_nodes.size() - 1;
671 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); 672 for (Node* node : base::Reversed(buffer.pushed_nodes)) {
672 ++i) { 673 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(node),
673 Emit(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(*i),
674 g.TempImmediate(slot << kPointerSizeLog2)); 674 g.TempImmediate(slot << kPointerSizeLog2));
675 slot--; 675 slot--;
676 } 676 }
677 677
678 // Pass label of exception handler block. 678 // Pass label of exception handler block.
679 CallDescriptor::Flags flags = descriptor->flags(); 679 CallDescriptor::Flags flags = descriptor->flags();
680 if (handler != nullptr) { 680 if (handler != nullptr) {
681 flags |= CallDescriptor::kHasExceptionHandler; 681 flags |= CallDescriptor::kHasExceptionHandler;
682 buffer.instruction_args.push_back(g.Label(handler)); 682 buffer.instruction_args.push_back(g.Label(handler));
683 } 683 }
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 InstructionSelector::SupportedMachineOperatorFlags() { 1188 InstructionSelector::SupportedMachineOperatorFlags() {
1189 return MachineOperatorBuilder::kFloat32Abs | 1189 return MachineOperatorBuilder::kFloat32Abs |
1190 MachineOperatorBuilder::kFloat64Abs | 1190 MachineOperatorBuilder::kFloat64Abs |
1191 MachineOperatorBuilder::kFloat64RoundDown | 1191 MachineOperatorBuilder::kFloat64RoundDown |
1192 MachineOperatorBuilder::kFloat64RoundTruncate; 1192 MachineOperatorBuilder::kFloat64RoundTruncate;
1193 } 1193 }
1194 1194
1195 } // namespace compiler 1195 } // namespace compiler
1196 } // namespace internal 1196 } // namespace internal
1197 } // namespace v8 1197 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/ppc/instruction-selector-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698