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

Side by Side Diff: src/compiler/mips/instruction-selector-mips.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
« no previous file with comments | « src/compiler/liveness-analyzer.cc ('k') | src/compiler/mips64/instruction-selector-mips64.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/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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 513
513 // Compute InstructionOperands for inputs and outputs. 514 // Compute InstructionOperands for inputs and outputs.
514 InitializeCallBuffer(node, &buffer, true, false); 515 InitializeCallBuffer(node, &buffer, true, false);
515 // Possibly align stack here for functions. 516 // Possibly align stack here for functions.
516 int push_count = buffer.pushed_nodes.size(); 517 int push_count = buffer.pushed_nodes.size();
517 if (push_count > 0) { 518 if (push_count > 0) {
518 Emit(kMipsStackClaim, g.NoOutput(), 519 Emit(kMipsStackClaim, g.NoOutput(),
519 g.TempImmediate(push_count << kPointerSizeLog2)); 520 g.TempImmediate(push_count << kPointerSizeLog2));
520 } 521 }
521 int slot = buffer.pushed_nodes.size() - 1; 522 int slot = buffer.pushed_nodes.size() - 1;
522 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); 523 for (Node* node : base::Reversed(buffer.pushed_nodes)) {
523 ++i) { 524 Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(node),
524 Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(*i),
525 g.TempImmediate(slot << kPointerSizeLog2)); 525 g.TempImmediate(slot << kPointerSizeLog2));
526 slot--; 526 slot--;
527 } 527 }
528 528
529 // Pass label of exception handler block. 529 // Pass label of exception handler block.
530 CallDescriptor::Flags flags = descriptor->flags(); 530 CallDescriptor::Flags flags = descriptor->flags();
531 if (handler != nullptr) { 531 if (handler != nullptr) {
532 flags |= CallDescriptor::kHasExceptionHandler; 532 flags |= CallDescriptor::kHasExceptionHandler;
533 buffer.instruction_args.push_back(g.Label(handler)); 533 buffer.instruction_args.push_back(g.Label(handler));
534 } 534 }
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { 980 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) {
981 flags |= MachineOperatorBuilder::kFloat64RoundDown | 981 flags |= MachineOperatorBuilder::kFloat64RoundDown |
982 MachineOperatorBuilder::kFloat64RoundTruncate; 982 MachineOperatorBuilder::kFloat64RoundTruncate;
983 } 983 }
984 return flags; 984 return flags;
985 } 985 }
986 986
987 } // namespace compiler 987 } // namespace compiler
988 } // namespace internal 988 } // namespace internal
989 } // namespace v8 989 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/liveness-analyzer.cc ('k') | src/compiler/mips64/instruction-selector-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698