Chromium Code Reviews| 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 // Adds Arm-specific methods for generating InstructionOperands. | 15 // Adds Arm-specific methods for generating InstructionOperands. |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1092 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); | 1093 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); |
| 1093 | 1094 |
| 1094 // Compute InstructionOperands for inputs and outputs. | 1095 // Compute InstructionOperands for inputs and outputs. |
| 1095 // TODO(turbofan): on ARM64 it's probably better to use the code object in a | 1096 // TODO(turbofan): on ARM64 it's probably better to use the code object in a |
| 1096 // register if there are multiple uses of it. Improve constant pool and the | 1097 // register if there are multiple uses of it. Improve constant pool and the |
| 1097 // heuristics in the register allocator for where to emit constants. | 1098 // heuristics in the register allocator for where to emit constants. |
| 1098 InitializeCallBuffer(node, &buffer, true, false); | 1099 InitializeCallBuffer(node, &buffer, true, false); |
| 1099 | 1100 |
| 1100 // TODO(dcarney): might be possible to use claim/poke instead | 1101 // TODO(dcarney): might be possible to use claim/poke instead |
| 1101 // Push any stack arguments. | 1102 // Push any stack arguments. |
| 1102 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); | 1103 for (auto i : base::Reversed(buffer.pushed_nodes)) { |
|
Michael Starzinger
2015/04/20 13:11:14
nit: s/auto i/Node* node/
Sven Panne
2015/04/20 14:38:35
Done.
| |
| 1103 ++i) { | 1104 Emit(kArmPush, g.NoOutput(), g.UseRegister(i)); |
| 1104 Emit(kArmPush, g.NoOutput(), g.UseRegister(*i)); | |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 // Pass label of exception handler block. | 1107 // Pass label of exception handler block. |
| 1108 CallDescriptor::Flags flags = descriptor->flags(); | 1108 CallDescriptor::Flags flags = descriptor->flags(); |
| 1109 if (handler != nullptr) { | 1109 if (handler != nullptr) { |
| 1110 flags |= CallDescriptor::kHasExceptionHandler; | 1110 flags |= CallDescriptor::kHasExceptionHandler; |
| 1111 buffer.instruction_args.push_back(g.Label(handler)); | 1111 buffer.instruction_args.push_back(g.Label(handler)); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 // Select the appropriate opcode based on the call type. | 1114 // Select the appropriate opcode based on the call type. |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1521 flags |= MachineOperatorBuilder::kFloat64RoundDown | | 1521 flags |= MachineOperatorBuilder::kFloat64RoundDown | |
| 1522 MachineOperatorBuilder::kFloat64RoundTruncate | | 1522 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1523 MachineOperatorBuilder::kFloat64RoundTiesAway; | 1523 MachineOperatorBuilder::kFloat64RoundTiesAway; |
| 1524 } | 1524 } |
| 1525 return flags; | 1525 return flags; |
| 1526 } | 1526 } |
| 1527 | 1527 |
| 1528 } // namespace compiler | 1528 } // namespace compiler |
| 1529 } // namespace internal | 1529 } // namespace internal |
| 1530 } // namespace v8 | 1530 } // namespace v8 |
| OLD | NEW |