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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.cc

Issue 1050803002: [turbofan] cleanup InstructionOperand a little (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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/graph-visualizer.cc ('k') | src/compiler/instruction.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/ia32/assembler-ia32.h" 10 #include "src/ia32/assembler-ia32.h"
(...skipping 29 matching lines...) Expand all
40 Operand ToOperand(InstructionOperand* op, int extra = 0) { 40 Operand ToOperand(InstructionOperand* op, int extra = 0) {
41 if (op->IsRegister()) { 41 if (op->IsRegister()) {
42 DCHECK(extra == 0); 42 DCHECK(extra == 0);
43 return Operand(ToRegister(op)); 43 return Operand(ToRegister(op));
44 } else if (op->IsDoubleRegister()) { 44 } else if (op->IsDoubleRegister()) {
45 DCHECK(extra == 0); 45 DCHECK(extra == 0);
46 return Operand(ToDoubleRegister(op)); 46 return Operand(ToDoubleRegister(op));
47 } 47 }
48 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot()); 48 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot());
49 // The linkage computes where all spill slots are located. 49 // The linkage computes where all spill slots are located.
50 FrameOffset offset = linkage()->GetFrameOffset(op->index(), frame(), extra); 50 FrameOffset offset = linkage()->GetFrameOffset(
51 AllocatedOperand::cast(op)->index(), frame(), extra);
51 return Operand(offset.from_stack_pointer() ? esp : ebp, offset.offset()); 52 return Operand(offset.from_stack_pointer() ? esp : ebp, offset.offset());
52 } 53 }
53 54
54 Operand HighOperand(InstructionOperand* op) { 55 Operand HighOperand(InstructionOperand* op) {
55 DCHECK(op->IsDoubleStackSlot()); 56 DCHECK(op->IsDoubleStackSlot());
56 return ToOperand(op, kPointerSize); 57 return ToOperand(op, kPointerSize);
57 } 58 }
58 59
59 Immediate ToImmediate(InstructionOperand* operand) { 60 Immediate ToImmediate(InstructionOperand* operand) {
60 Constant constant = ToConstant(operand); 61 Constant constant = ToConstant(operand);
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 } 1424 }
1424 } 1425 }
1425 MarkLazyDeoptSite(); 1426 MarkLazyDeoptSite();
1426 } 1427 }
1427 1428
1428 #undef __ 1429 #undef __
1429 1430
1430 } // namespace compiler 1431 } // namespace compiler
1431 } // namespace internal 1432 } // namespace internal
1432 } // namespace v8 1433 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/graph-visualizer.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698