OLD | NEW |
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 <assert.h> // For assert | 5 #include <assert.h> // For assert |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_PPC | 8 #if V8_TARGET_ARCH_PPC |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 } else { | 557 } else { |
558 if (marker_reg.is_valid()) { | 558 if (marker_reg.is_valid()) { |
559 Pop(r0, fp, cp, marker_reg); | 559 Pop(r0, fp, cp, marker_reg); |
560 } else { | 560 } else { |
561 Pop(r0, fp, cp); | 561 Pop(r0, fp, cp); |
562 } | 562 } |
563 } | 563 } |
564 mtlr(r0); | 564 mtlr(r0); |
565 } | 565 } |
566 | 566 |
| 567 void MacroAssembler::RestoreFrameStateForTailCall() { |
| 568 if (FLAG_enable_embedded_constant_pool) { |
| 569 LoadP(kConstantPoolRegister, |
| 570 MemOperand(fp, StandardFrameConstants::kConstantPoolOffset)); |
| 571 set_constant_pool_available(false); |
| 572 } |
| 573 LoadP(r0, MemOperand(fp, StandardFrameConstants::kCallerPCOffset)); |
| 574 LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 575 mtlr(r0); |
| 576 } |
567 | 577 |
568 const RegList MacroAssembler::kSafepointSavedRegisters = Register::kAllocatable; | 578 const RegList MacroAssembler::kSafepointSavedRegisters = Register::kAllocatable; |
569 const int MacroAssembler::kNumSafepointSavedRegisters = | 579 const int MacroAssembler::kNumSafepointSavedRegisters = |
570 Register::kNumAllocatable; | 580 Register::kNumAllocatable; |
571 | 581 |
572 // Push and pop all registers that can hold pointers. | 582 // Push and pop all registers that can hold pointers. |
573 void MacroAssembler::PushSafepointRegisters() { | 583 void MacroAssembler::PushSafepointRegisters() { |
574 // Safepoints expect a block of kNumSafepointRegisters values on the | 584 // Safepoints expect a block of kNumSafepointRegisters values on the |
575 // stack, so adjust the stack for unsaved registers. | 585 // stack, so adjust the stack for unsaved registers. |
576 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 586 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
(...skipping 3739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4316 } | 4326 } |
4317 if (mag.shift > 0) srawi(result, result, mag.shift); | 4327 if (mag.shift > 0) srawi(result, result, mag.shift); |
4318 ExtractBit(r0, dividend, 31); | 4328 ExtractBit(r0, dividend, 31); |
4319 add(result, result, r0); | 4329 add(result, result, r0); |
4320 } | 4330 } |
4321 | 4331 |
4322 } // namespace internal | 4332 } // namespace internal |
4323 } // namespace v8 | 4333 } // namespace v8 |
4324 | 4334 |
4325 #endif // V8_TARGET_ARCH_PPC | 4335 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |