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

Side by Side Diff: src/compiler/ppc/instruction-selector-ppc.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/mips64/instruction-selector-mips64.cc ('k') | src/compiler/register-allocator.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/compiler/instruction-selector-impl.h" 6 #include "src/compiler/instruction-selector-impl.h"
6 #include "src/compiler/node-matchers.h" 7 #include "src/compiler/node-matchers.h"
7 #include "src/compiler/node-properties.h" 8 #include "src/compiler/node-properties.h"
8 9
9 namespace v8 { 10 namespace v8 {
10 namespace internal { 11 namespace internal {
11 namespace compiler { 12 namespace compiler {
12 13
13 enum ImmediateMode { 14 enum ImmediateMode {
14 kInt16Imm, 15 kInt16Imm,
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 CallBuffer buffer(zone(), descriptor, frame_state_descriptor); 1447 CallBuffer buffer(zone(), descriptor, frame_state_descriptor);
1447 1448
1448 // Compute InstructionOperands for inputs and outputs. 1449 // Compute InstructionOperands for inputs and outputs.
1449 // TODO(turbofan): on PPC it's probably better to use the code object in a 1450 // TODO(turbofan): on PPC it's probably better to use the code object in a
1450 // register if there are multiple uses of it. Improve constant pool and the 1451 // register if there are multiple uses of it. Improve constant pool and the
1451 // heuristics in the register allocator for where to emit constants. 1452 // heuristics in the register allocator for where to emit constants.
1452 InitializeCallBuffer(node, &buffer, true, false); 1453 InitializeCallBuffer(node, &buffer, true, false);
1453 1454
1454 // Push any stack arguments. 1455 // Push any stack arguments.
1455 // TODO(mbrandy): reverse order and use push only for first 1456 // TODO(mbrandy): reverse order and use push only for first
1456 for (auto i = buffer.pushed_nodes.rbegin(); i != buffer.pushed_nodes.rend(); 1457 for (Node* node : base::Reversed(buffer.pushed_nodes)) {
1457 i++) { 1458 Emit(kPPC_Push, g.NoOutput(), g.UseRegister(node));
1458 Emit(kPPC_Push, g.NoOutput(), g.UseRegister(*i));
1459 } 1459 }
1460 1460
1461 // Pass label of exception handler block. 1461 // Pass label of exception handler block.
1462 CallDescriptor::Flags flags = descriptor->flags(); 1462 CallDescriptor::Flags flags = descriptor->flags();
1463 if (handler != nullptr) { 1463 if (handler != nullptr) {
1464 flags |= CallDescriptor::kHasExceptionHandler; 1464 flags |= CallDescriptor::kHasExceptionHandler;
1465 buffer.instruction_args.push_back(g.Label(handler)); 1465 buffer.instruction_args.push_back(g.Label(handler));
1466 } 1466 }
1467 1467
1468 // Select the appropriate opcode based on the call type. 1468 // Select the appropriate opcode based on the call type.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1548 MachineOperatorBuilder::kFloat64Min | 1548 MachineOperatorBuilder::kFloat64Min |
1549 MachineOperatorBuilder::kFloat64RoundDown | 1549 MachineOperatorBuilder::kFloat64RoundDown |
1550 MachineOperatorBuilder::kFloat64RoundTruncate | 1550 MachineOperatorBuilder::kFloat64RoundTruncate |
1551 MachineOperatorBuilder::kFloat64RoundTiesAway; 1551 MachineOperatorBuilder::kFloat64RoundTiesAway;
1552 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. 1552 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f.
1553 } 1553 }
1554 1554
1555 } // namespace compiler 1555 } // namespace compiler
1556 } // namespace internal 1556 } // namespace internal
1557 } // namespace v8 1557 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698