OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |