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

Side by Side Diff: src/compiler/arm/instruction-selector-arm.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/base/macros.h ('k') | src/compiler/ia32/instruction-selector-ia32.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 // 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
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 (Node* node : base::Reversed(buffer.pushed_nodes)) {
1103 ++i) { 1104 Emit(kArmPush, g.NoOutput(), g.UseRegister(node));
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
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
OLDNEW
« no previous file with comments | « src/base/macros.h ('k') | src/compiler/ia32/instruction-selector-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698