| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/lithium-allocator-inl.h" | 9 #include "src/lithium-allocator-inl.h" |
| 10 #include "src/x64/lithium-x64.h" | 10 #include "src/x64/lithium-x64.h" |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 324 |
| 325 stream->Add(" length "); | 325 stream->Add(" length "); |
| 326 length()->PrintTo(stream); | 326 length()->PrintTo(stream); |
| 327 | 327 |
| 328 stream->Add(" index "); | 328 stream->Add(" index "); |
| 329 index()->PrintTo(stream); | 329 index()->PrintTo(stream); |
| 330 } | 330 } |
| 331 | 331 |
| 332 | 332 |
| 333 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { | 333 int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) { |
| 334 if (kind == DOUBLE_REGISTERS && kDoubleSize == 2 * kPointerSize) { |
| 335 // Skip a slot if for a double-width slot for x32 port. |
| 336 spill_slot_count_++; |
| 337 // The spill slot's address is at rbp - (index + 1) * kPointerSize - |
| 338 // StandardFrameConstants::kFixedFrameSizeFromFp. kFixedFrameSizeFromFp is |
| 339 // 2 * kPointerSize, if rbp is aligned at 8-byte boundary, the below "|= 1" |
| 340 // will make sure the spilled doubles are aligned at 8-byte boundary. |
| 341 // TODO(haitao): make sure rbp is aligned at 8-byte boundary for x32 port. |
| 342 spill_slot_count_ |= 1; |
| 343 } |
| 334 return spill_slot_count_++; | 344 return spill_slot_count_++; |
| 335 } | 345 } |
| 336 | 346 |
| 337 | 347 |
| 338 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { | 348 LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) { |
| 339 // All stack slots are Double stack slots on x64. | 349 // All stack slots are Double stack slots on x64. |
| 340 // Alternatively, at some point, start using half-size | 350 // Alternatively, at some point, start using half-size |
| 341 // stack slots for int32 values. | 351 // stack slots for int32 values. |
| 342 int index = GetNextSpillIndex(kind); | 352 int index = GetNextSpillIndex(kind); |
| 343 if (kind == DOUBLE_REGISTERS) { | 353 if (kind == DOUBLE_REGISTERS) { |
| (...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2597 LOperand* function = UseRegisterAtStart(instr->function()); | 2607 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2598 LAllocateBlockContext* result = | 2608 LAllocateBlockContext* result = |
| 2599 new(zone()) LAllocateBlockContext(context, function); | 2609 new(zone()) LAllocateBlockContext(context, function); |
| 2600 return MarkAsCall(DefineFixed(result, rsi), instr); | 2610 return MarkAsCall(DefineFixed(result, rsi), instr); |
| 2601 } | 2611 } |
| 2602 | 2612 |
| 2603 | 2613 |
| 2604 } } // namespace v8::internal | 2614 } } // namespace v8::internal |
| 2605 | 2615 |
| 2606 #endif // V8_TARGET_ARCH_X64 | 2616 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |