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

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

Issue 1713853003: VM: Share object pool entries for optimized static calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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.h ('k') | runtime/vm/assembler_arm64.h » ('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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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/longjump.h" 10 #include "vm/longjump.h"
(...skipping 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after
2744 const Code& code = Code::Handle(stub_entry.code()); 2744 const Code& code = Code::Handle(stub_entry.code());
2745 BranchLink(code, patchable); 2745 BranchLink(code, patchable);
2746 } 2746 }
2747 2747
2748 2748
2749 void Assembler::BranchLinkPatchable(const Code& target) { 2749 void Assembler::BranchLinkPatchable(const Code& target) {
2750 BranchLink(target, kPatchable); 2750 BranchLink(target, kPatchable);
2751 } 2751 }
2752 2752
2753 2753
2754 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
2755 const Object& equivalence) {
2756 const Code& target = Code::Handle(stub_entry.code());
2757 // Make sure that class CallPattern is able to patch the label referred
2758 // to by this code sequence.
2759 // For added code robustness, use 'blx lr' in a patchable sequence and
2760 // use 'blx ip' in a non-patchable sequence (see other BranchLink flavors).
2761 const int32_t offset = ObjectPool::element_offset(
2762 object_pool_wrapper_.FindObject(target, equivalence));
2763 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag, PP, AL);
2764 ldr(LR, FieldAddress(CODE_REG, Code::entry_point_offset()));
2765 blx(LR); // Use blx instruction so that the return branch prediction works.
2766 }
2767
2768
2754 void Assembler::BranchLink(const ExternalLabel* label) { 2769 void Assembler::BranchLink(const ExternalLabel* label) {
2755 LoadImmediate(LR, label->address()); // Target address is never patched. 2770 LoadImmediate(LR, label->address()); // Target address is never patched.
2756 blx(LR); // Use blx instruction so that the return branch prediction works. 2771 blx(LR); // Use blx instruction so that the return branch prediction works.
2757 } 2772 }
2758 2773
2759 2774
2760 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) { 2775 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
2761 BranchLinkPatchable(Code::Handle(stub_entry.code())); 2776 BranchLinkPatchable(Code::Handle(stub_entry.code()));
2762 } 2777 }
2763 2778
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
3667 3682
3668 3683
3669 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3684 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3670 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); 3685 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
3671 return fpu_reg_names[reg]; 3686 return fpu_reg_names[reg];
3672 } 3687 }
3673 3688
3674 } // namespace dart 3689 } // namespace dart
3675 3690
3676 #endif // defined TARGET_ARCH_ARM 3691 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698