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

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

Issue 1778103003: Invoke CallToRuntime via Thread instead of ObjectPools. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/runtime_entry_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ASSERT(constant_pool_allowed()); 110 ASSERT(constant_pool_allowed());
111 const Code& target = Code::Handle(stub_entry.code()); 111 const Code& target = Code::Handle(stub_entry.code());
112 const int32_t offset = ObjectPool::element_offset( 112 const int32_t offset = ObjectPool::element_offset(
113 object_pool_wrapper_.FindObject(target, kNotPatchable)); 113 object_pool_wrapper_.FindObject(target, kNotPatchable));
114 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag); 114 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
115 movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset())); 115 movq(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
116 call(TMP); 116 call(TMP);
117 } 117 }
118 118
119 119
120 void Assembler::CallToRuntime() {
121 movq(TMP, Address(THR, Thread::call_to_runtime_entry_point_offset()));
122 movq(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
123 call(TMP);
124 }
125
126
120 void Assembler::pushq(Register reg) { 127 void Assembler::pushq(Register reg) {
121 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 128 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
122 EmitRegisterREX(reg, REX_NONE); 129 EmitRegisterREX(reg, REX_NONE);
123 EmitUint8(0x50 | (reg & 7)); 130 EmitUint8(0x50 | (reg & 7));
124 } 131 }
125 132
126 133
127 void Assembler::pushq(const Address& address) { 134 void Assembler::pushq(const Address& address) {
128 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 135 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
129 EmitOperandREX(6, address, REX_NONE); 136 EmitOperandREX(6, address, REX_NONE);
(...skipping 3811 matching lines...) Expand 10 before | Expand all | Expand 10 after
3941 3948
3942 3949
3943 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3950 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3944 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3951 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3945 return xmm_reg_names[reg]; 3952 return xmm_reg_names[reg];
3946 } 3953 }
3947 3954
3948 } // namespace dart 3955 } // namespace dart
3949 3956
3950 #endif // defined TARGET_ARCH_X64 3957 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/runtime_entry_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698