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

Side by Side Diff: runtime/vm/assembler_x64.cc

Issue 1316673005: Track which entries in the ObjectPool are native entries, and reset them when loading a precompiled… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 void Assembler::LoadExternalLabel(Register dst, 64 void Assembler::LoadExternalLabel(Register dst,
65 const ExternalLabel* label, 65 const ExternalLabel* label,
66 Patchability patchable) { 66 Patchability patchable) {
67 const int32_t offset = ObjectPool::element_offset( 67 const int32_t offset = ObjectPool::element_offset(
68 object_pool_wrapper_.FindExternalLabel(label, patchable)); 68 object_pool_wrapper_.FindExternalLabel(label, patchable));
69 LoadWordFromPoolOffset(dst, offset - kHeapObjectTag); 69 LoadWordFromPoolOffset(dst, offset - kHeapObjectTag);
70 } 70 }
71 71
72 72
73 void Assembler::LoadNativeEntry(Register dst,
74 const ExternalLabel* label,
75 Patchability patchable) {
76 const int32_t offset = ObjectPool::element_offset(
77 object_pool_wrapper_.FindNativeEntry(label, patchable));
78 LoadWordFromPoolOffset(dst, offset - kHeapObjectTag);
79 }
80
81
73 void Assembler::call(const ExternalLabel* label) { 82 void Assembler::call(const ExternalLabel* label) {
74 { // Encode movq(TMP, Immediate(label->address())), but always as imm64. 83 { // Encode movq(TMP, Immediate(label->address())), but always as imm64.
75 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 84 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
76 EmitRegisterREX(TMP, REX_W); 85 EmitRegisterREX(TMP, REX_W);
77 EmitUint8(0xB8 | (TMP & 7)); 86 EmitUint8(0xB8 | (TMP & 7));
78 EmitInt64(label->address()); 87 EmitInt64(label->address());
79 } 88 }
80 call(TMP); 89 call(TMP);
81 } 90 }
82 91
(...skipping 3844 matching lines...) Expand 10 before | Expand all | Expand 10 after
3927 3936
3928 3937
3929 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3938 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3930 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3939 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3931 return xmm_reg_names[reg]; 3940 return xmm_reg_names[reg];
3932 } 3941 }
3933 3942
3934 } // namespace dart 3943 } // namespace dart
3935 3944
3936 #endif // defined TARGET_ARCH_X64 3945 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698