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

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

Issue 1250323002: Load immediates via the constant pool on armv5te and armv6. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 years, 5 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_arm.cc ('k') | runtime/vm/code_patcher_arm_test.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 2867 matching lines...) Expand 10 before | Expand all | Expand 10 after
2878 bool Assembler::CanLoadImmediateFromPool(const Immediate& imm, Register pp) { 2878 bool Assembler::CanLoadImmediateFromPool(const Immediate& imm, Register pp) {
2879 if (!constant_pool_allowed()) { 2879 if (!constant_pool_allowed()) {
2880 return false; 2880 return false;
2881 } 2881 }
2882 return !imm.is_int32() && (pp != kNoRegister); 2882 return !imm.is_int32() && (pp != kNoRegister);
2883 } 2883 }
2884 2884
2885 2885
2886 void Assembler::LoadImmediate(Register reg, const Immediate& imm, Register pp) { 2886 void Assembler::LoadImmediate(Register reg, const Immediate& imm, Register pp) {
2887 if (CanLoadImmediateFromPool(imm, pp)) { 2887 if (CanLoadImmediateFromPool(imm, pp)) {
2888 // It's a 64-bit constant and we're not in the VM isolate, so load from
2889 // object pool.
2890 int32_t offset = ObjectPool::element_offset(FindImmediate(imm.value())); 2888 int32_t offset = ObjectPool::element_offset(FindImmediate(imm.value()));
2891 LoadWordFromPoolOffset(reg, pp, offset - kHeapObjectTag); 2889 LoadWordFromPoolOffset(reg, pp, offset - kHeapObjectTag);
2892 } else { 2890 } else {
2893 movq(reg, imm); 2891 movq(reg, imm);
2894 } 2892 }
2895 } 2893 }
2896 2894
2897 2895
2898 void Assembler::MoveImmediate(const Address& dst, const Immediate& imm, 2896 void Assembler::MoveImmediate(const Address& dst, const Immediate& imm,
2899 Register pp) { 2897 Register pp) {
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
3933 3931
3934 3932
3935 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3933 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3936 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3934 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3937 return xmm_reg_names[reg]; 3935 return xmm_reg_names[reg];
3938 } 3936 }
3939 3937
3940 } // namespace dart 3938 } // namespace dart
3941 3939
3942 #endif // defined TARGET_ARCH_X64 3940 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/code_patcher_arm_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698