| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3688 void MacroAssembler::PushSafepointRegisters() { | 3688 void MacroAssembler::PushSafepointRegisters() { |
| 3689 // Safepoints expect a block of kNumSafepointRegisters values on the stack, so | 3689 // Safepoints expect a block of kNumSafepointRegisters values on the stack, so |
| 3690 // adjust the stack for unsaved registers. | 3690 // adjust the stack for unsaved registers. |
| 3691 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 3691 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
| 3692 ASSERT(num_unsaved >= 0); | 3692 ASSERT(num_unsaved >= 0); |
| 3693 Claim(num_unsaved); | 3693 Claim(num_unsaved); |
| 3694 PushXRegList(kSafepointSavedRegisters); | 3694 PushXRegList(kSafepointSavedRegisters); |
| 3695 } | 3695 } |
| 3696 | 3696 |
| 3697 | 3697 |
| 3698 void MacroAssembler::PushSafepointFPRegisters() { |
| 3699 PushCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSize, |
| 3700 FPRegister::kAllocatableFPRegisters)); |
| 3701 } |
| 3702 |
| 3703 |
| 3704 void MacroAssembler::PopSafepointFPRegisters() { |
| 3705 PopCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSize, |
| 3706 FPRegister::kAllocatableFPRegisters)); |
| 3707 } |
| 3708 |
| 3709 |
| 3698 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { | 3710 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { |
| 3699 // Make sure the safepoint registers list is what we expect. | 3711 // Make sure the safepoint registers list is what we expect. |
| 3700 ASSERT(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff); | 3712 ASSERT(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff); |
| 3701 | 3713 |
| 3702 // Safepoint registers are stored contiguously on the stack, but not all the | 3714 // Safepoint registers are stored contiguously on the stack, but not all the |
| 3703 // registers are saved. The following registers are excluded: | 3715 // registers are saved. The following registers are excluded: |
| 3704 // - x16 and x17 (ip0 and ip1) because they shouldn't be preserved outside of | 3716 // - x16 and x17 (ip0 and ip1) because they shouldn't be preserved outside of |
| 3705 // the macro assembler. | 3717 // the macro assembler. |
| 3706 // - x28 (jssp) because JS stack pointer doesn't need to be included in | 3718 // - x28 (jssp) because JS stack pointer doesn't need to be included in |
| 3707 // safepoint registers. | 3719 // safepoint registers. |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4610 } | 4622 } |
| 4611 } | 4623 } |
| 4612 | 4624 |
| 4613 | 4625 |
| 4614 #undef __ | 4626 #undef __ |
| 4615 | 4627 |
| 4616 | 4628 |
| 4617 } } // namespace v8::internal | 4629 } } // namespace v8::internal |
| 4618 | 4630 |
| 4619 #endif // V8_TARGET_ARCH_A64 | 4631 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |