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/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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount())); | 498 GetFrameStateDescriptor(node->InputAt(descriptor->InputCount())); |
499 } | 499 } |
500 | 500 |
501 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); | 501 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
502 | 502 |
503 // Compute InstructionOperands for inputs and outputs. | 503 // Compute InstructionOperands for inputs and outputs. |
504 InitializeCallBuffer(node, &buffer, true, false); | 504 InitializeCallBuffer(node, &buffer, true, false); |
505 // Possibly align stack here for functions. | 505 // Possibly align stack here for functions. |
506 int push_count = buffer.pushed_nodes.size(); | 506 int push_count = buffer.pushed_nodes.size(); |
507 if (push_count > 0) { | 507 if (push_count > 0) { |
508 Emit(kMipsStackClaim | MiscField::encode(push_count), g.NoOutput()); | 508 Emit(kMipsStackClaim, g.NoOutput(), |
| 509 g.TempImmediate(push_count << kPointerSizeLog2)); |
509 } | 510 } |
510 int slot = buffer.pushed_nodes.size() - 1; | 511 int slot = buffer.pushed_nodes.size() - 1; |
511 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); | 512 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); |
512 ++i) { | 513 ++i) { |
513 Emit(kMipsStoreToStackSlot | MiscField::encode(slot), g.NoOutput(), | 514 Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(*i), |
514 g.UseRegister(*i)); | 515 g.TempImmediate(slot << kPointerSizeLog2)); |
515 slot--; | 516 slot--; |
516 } | 517 } |
517 | 518 |
518 // Pass label of exception handler block. | 519 // Pass label of exception handler block. |
519 CallDescriptor::Flags flags = descriptor->flags(); | 520 CallDescriptor::Flags flags = descriptor->flags(); |
520 if (handler != nullptr) { | 521 if (handler != nullptr) { |
521 flags |= CallDescriptor::kHasExceptionHandler; | 522 flags |= CallDescriptor::kHasExceptionHandler; |
522 buffer.instruction_args.push_back(g.Label(handler)); | 523 buffer.instruction_args.push_back(g.Label(handler)); |
523 } | 524 } |
524 | 525 |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { | 967 if (IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)) { |
967 return MachineOperatorBuilder::kFloat64RoundDown | | 968 return MachineOperatorBuilder::kFloat64RoundDown | |
968 MachineOperatorBuilder::kFloat64RoundTruncate; | 969 MachineOperatorBuilder::kFloat64RoundTruncate; |
969 } | 970 } |
970 return MachineOperatorBuilder::kNoFlags; | 971 return MachineOperatorBuilder::kNoFlags; |
971 } | 972 } |
972 | 973 |
973 } // namespace compiler | 974 } // namespace compiler |
974 } // namespace internal | 975 } // namespace internal |
975 } // namespace v8 | 976 } // namespace v8 |
OLD | NEW |