| 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/debug/debug.h" | 11 #include "src/debug/debug.h" |
| 12 #include "src/register-configuration.h" |
| 12 #include "src/runtime/runtime.h" | 13 #include "src/runtime/runtime.h" |
| 13 | 14 |
| 14 #include "src/arm64/frames-arm64.h" | 15 #include "src/arm64/frames-arm64.h" |
| 15 #include "src/arm64/macro-assembler-arm64.h" | 16 #include "src/arm64/macro-assembler-arm64.h" |
| 16 | 17 |
| 17 namespace v8 { | 18 namespace v8 { |
| 18 namespace internal { | 19 namespace internal { |
| 19 | 20 |
| 20 // Define a fake double underscore to use with the ASM_UNIMPLEMENTED macros. | 21 // Define a fake double underscore to use with the ASM_UNIMPLEMENTED macros. |
| 21 #define __ | 22 #define __ |
| (...skipping 3955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3977 // adjust the stack for unsaved registers. | 3978 // adjust the stack for unsaved registers. |
| 3978 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; | 3979 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; |
| 3979 DCHECK(num_unsaved >= 0); | 3980 DCHECK(num_unsaved >= 0); |
| 3980 Claim(num_unsaved); | 3981 Claim(num_unsaved); |
| 3981 PushXRegList(kSafepointSavedRegisters); | 3982 PushXRegList(kSafepointSavedRegisters); |
| 3982 } | 3983 } |
| 3983 | 3984 |
| 3984 | 3985 |
| 3985 void MacroAssembler::PushSafepointRegistersAndDoubles() { | 3986 void MacroAssembler::PushSafepointRegistersAndDoubles() { |
| 3986 PushSafepointRegisters(); | 3987 PushSafepointRegisters(); |
| 3987 PushCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSizeInBits, | 3988 PushCPURegList(CPURegList( |
| 3988 FPRegister::kAllocatableFPRegisters)); | 3989 CPURegister::kFPRegister, kDRegSizeInBits, |
| 3990 RegisterConfiguration::ArchDefault()->allocatable_double_codes_mask())); |
| 3989 } | 3991 } |
| 3990 | 3992 |
| 3991 | 3993 |
| 3992 void MacroAssembler::PopSafepointRegistersAndDoubles() { | 3994 void MacroAssembler::PopSafepointRegistersAndDoubles() { |
| 3993 PopCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSizeInBits, | 3995 PopCPURegList(CPURegList( |
| 3994 FPRegister::kAllocatableFPRegisters)); | 3996 CPURegister::kFPRegister, kDRegSizeInBits, |
| 3997 RegisterConfiguration::ArchDefault()->allocatable_double_codes_mask())); |
| 3995 PopSafepointRegisters(); | 3998 PopSafepointRegisters(); |
| 3996 } | 3999 } |
| 3997 | 4000 |
| 3998 | 4001 |
| 3999 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { | 4002 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { |
| 4000 // Make sure the safepoint registers list is what we expect. | 4003 // Make sure the safepoint registers list is what we expect. |
| 4001 DCHECK(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff); | 4004 DCHECK(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff); |
| 4002 | 4005 |
| 4003 // Safepoint registers are stored contiguously on the stack, but not all the | 4006 // Safepoint registers are stored contiguously on the stack, but not all the |
| 4004 // registers are saved. The following registers are excluded: | 4007 // registers are saved. The following registers are excluded: |
| (...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5061 } | 5064 } |
| 5062 | 5065 |
| 5063 | 5066 |
| 5064 #undef __ | 5067 #undef __ |
| 5065 | 5068 |
| 5066 | 5069 |
| 5067 } // namespace internal | 5070 } // namespace internal |
| 5068 } // namespace v8 | 5071 } // namespace v8 |
| 5069 | 5072 |
| 5070 #endif // V8_TARGET_ARCH_ARM64 | 5073 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |