OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |