Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(262)

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge with ToT Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3947 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 // adjust the stack for unsaved registers. 3971 // adjust the stack for unsaved registers.
3971 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters; 3972 const int num_unsaved = kNumSafepointRegisters - kNumSafepointSavedRegisters;
3972 DCHECK(num_unsaved >= 0); 3973 DCHECK(num_unsaved >= 0);
3973 Claim(num_unsaved); 3974 Claim(num_unsaved);
3974 PushXRegList(kSafepointSavedRegisters); 3975 PushXRegList(kSafepointSavedRegisters);
3975 } 3976 }
3976 3977
3977 3978
3978 void MacroAssembler::PushSafepointRegistersAndDoubles() { 3979 void MacroAssembler::PushSafepointRegistersAndDoubles() {
3979 PushSafepointRegisters(); 3980 PushSafepointRegisters();
3980 PushCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSizeInBits, 3981 PushCPURegList(CPURegList(
3981 FPRegister::kAllocatableFPRegisters)); 3982 CPURegister::kFPRegister, kDRegSizeInBits,
3983 RegisterConfiguration::ArchDefault()->allocatable_double_codes_mask()));
3982 } 3984 }
3983 3985
3984 3986
3985 void MacroAssembler::PopSafepointRegistersAndDoubles() { 3987 void MacroAssembler::PopSafepointRegistersAndDoubles() {
3986 PopCPURegList(CPURegList(CPURegister::kFPRegister, kDRegSizeInBits, 3988 PopCPURegList(CPURegList(
3987 FPRegister::kAllocatableFPRegisters)); 3989 CPURegister::kFPRegister, kDRegSizeInBits,
3990 RegisterConfiguration::ArchDefault()->allocatable_double_codes_mask()));
3988 PopSafepointRegisters(); 3991 PopSafepointRegisters();
3989 } 3992 }
3990 3993
3991 3994
3992 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) { 3995 int MacroAssembler::SafepointRegisterStackIndex(int reg_code) {
3993 // Make sure the safepoint registers list is what we expect. 3996 // Make sure the safepoint registers list is what we expect.
3994 DCHECK(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff); 3997 DCHECK(CPURegList::GetSafepointSavedRegisters().list() == 0x6ffcffff);
3995 3998
3996 // Safepoint registers are stored contiguously on the stack, but not all the 3999 // Safepoint registers are stored contiguously on the stack, but not all the
3997 // registers are saved. The following registers are excluded: 4000 // registers are saved. The following registers are excluded:
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
5054 } 5057 }
5055 5058
5056 5059
5057 #undef __ 5060 #undef __
5058 5061
5059 5062
5060 } // namespace internal 5063 } // namespace internal
5061 } // namespace v8 5064 } // namespace v8
5062 5065
5063 #endif // V8_TARGET_ARCH_ARM64 5066 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698