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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
11 #include "src/cpu-profiler.h" | 11 #include "src/cpu-profiler.h" |
12 #include "src/debug/debug.h" | 12 #include "src/debug/debug.h" |
| 13 #include "src/register-configuration.h" |
13 #include "src/runtime/runtime.h" | 14 #include "src/runtime/runtime.h" |
14 | 15 |
15 #include "src/arm64/frames-arm64.h" | 16 #include "src/arm64/frames-arm64.h" |
16 #include "src/arm64/macro-assembler-arm64.h" | 17 #include "src/arm64/macro-assembler-arm64.h" |
17 | 18 |
18 namespace v8 { | 19 namespace v8 { |
19 namespace internal { | 20 namespace internal { |
20 | 21 |
21 // Define a fake double underscore to use with the ASM_UNIMPLEMENTED macros. | 22 // Define a fake double underscore to use with the ASM_UNIMPLEMENTED macros. |
22 #define __ | 23 #define __ |
(...skipping 4013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4036 // adjust the stack for unsaved registers. | 4037 // adjust the stack for unsaved registers. |
4037 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 4038 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
4038 DCHECK(num_unsaved >= 0); | 4039 DCHECK(num_unsaved >= 0); |
4039 Claim(num_unsaved); | 4040 Claim(num_unsaved); |
4040 PushXRegList(kSafepointSavedRegisters); | 4041 PushXRegList(kSafepointSavedRegisters); |
4041 } | 4042 } |
4042 | 4043 |
4043 | 4044 |
4044 void MacroAssembler::PushSafepointRegistersAndDoubles() { | 4045 void MacroAssembler::PushSafepointRegistersAndDoubles() { |
4045 PushSafepointRegisters(); | 4046 PushSafepointRegisters(); |
4046 PushCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSizeInBits, | 4047 PushCPURegList(CPURegList( |
4047 FPRegister::kAllocatableFPRegisters)); | 4048 CPURegister::kFPRegister, kDRegSizeInBits, |
| 4049 RegisterConfiguration::ArchDefault()->allocatable_double_codes_mask())); |
4048 } | 4050 } |
4049 | 4051 |
4050 | 4052 |
4051 void MacroAssembler::PopSafepointRegistersAndDoubles() { | 4053 void MacroAssembler::PopSafepointRegistersAndDoubles() { |
4052 PopCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSizeInBits, | 4054 PopCPURegList(CPURegList( |
4053 FPRegister::kAllocatableFPRegisters)); | 4055 CPURegister::kFPRegister, kDRegSizeInBits, |
| 4056 RegisterConfiguration::ArchDefault()->allocatable_double_codes_mask())); |
4054 PopSafepointRegisters(); | 4057 PopSafepointRegisters(); |
4055 } | 4058 } |
4056 | 4059 |
4057 | 4060 |
4058 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { | 4061 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { |
4059 // Make sure the safepoint registers list is what we expect. | 4062 // Make sure the safepoint registers list is what we expect. |
4060 DCHECK(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff); | 4063 DCHECK(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff); |
4061 | 4064 |
4062 // Safepoint registers are stored contiguously on the stack, but not all the | 4065 // Safepoint registers are stored contiguously on the stack, but not all the |
4063 // registers are saved. The following registers are excluded: | 4066 // registers are saved. The following registers are excluded: |
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5120 } | 5123 } |
5121 | 5124 |
5122 | 5125 |
5123 #undef __ | 5126 #undef __ |
5124 | 5127 |
5125 | 5128 |
5126 } // namespace internal | 5129 } // namespace internal |
5127 } // namespace v8 | 5130 } // namespace v8 |
5128 | 5131 |
5129 #endif // V8_TARGET_ARCH_ARM64 | 5132 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |