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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 2816703002: [arm] Remove embedded constant pool support. (Closed)
Patch Set: [arm] Remove embedded constant pool support. Created 3 years, 8 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 | « src/flag-definitions.h ('k') | src/register-configuration.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/assembler-inl.h" 7 #include "src/assembler-inl.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/builtins/builtins-constructor.h" 10 #include "src/builtins/builtins-constructor.h"
(...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2753 } 2753 }
2754 PushOperand(ip); 2754 PushOperand(ip);
2755 } 2755 }
2756 2756
2757 2757
2758 #undef __ 2758 #undef __
2759 2759
2760 2760
2761 static Address GetInterruptImmediateLoadAddress(Address pc) { 2761 static Address GetInterruptImmediateLoadAddress(Address pc) {
2762 Address load_address = pc - 2 * Assembler::kInstrSize; 2762 Address load_address = pc - 2 * Assembler::kInstrSize;
2763 if (!FLAG_enable_embedded_constant_pool) { 2763 DCHECK(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(load_address)));
2764 DCHECK(Assembler::IsLdrPcImmediateOffset(Memory::int32_at(load_address)));
2765 } else if (Assembler::IsLdrPpRegOffset(Memory::int32_at(load_address))) {
2766 // This is an extended constant pool lookup.
2767 if (CpuFeatures::IsSupported(ARMv7)) {
2768 load_address -= 2 * Assembler::kInstrSize;
2769 DCHECK(Assembler::IsMovW(Memory::int32_at(load_address)));
2770 DCHECK(Assembler::IsMovT(
2771 Memory::int32_at(load_address + Assembler::kInstrSize)));
2772 } else {
2773 load_address -= 4 * Assembler::kInstrSize;
2774 DCHECK(Assembler::IsMovImmed(Memory::int32_at(load_address)));
2775 DCHECK(Assembler::IsOrrImmed(
2776 Memory::int32_at(load_address + Assembler::kInstrSize)));
2777 DCHECK(Assembler::IsOrrImmed(
2778 Memory::int32_at(load_address + 2 * Assembler::kInstrSize)));
2779 DCHECK(Assembler::IsOrrImmed(
2780 Memory::int32_at(load_address + 3 * Assembler::kInstrSize)));
2781 }
2782 } else if (CpuFeatures::IsSupported(ARMv7) &&
2783 Assembler::IsMovT(Memory::int32_at(load_address))) {
2784 // This is a movw / movt immediate load.
2785 load_address -= Assembler::kInstrSize;
2786 DCHECK(Assembler::IsMovW(Memory::int32_at(load_address)));
2787 } else if (!CpuFeatures::IsSupported(ARMv7) &&
2788 Assembler::IsOrrImmed(Memory::int32_at(load_address))) {
2789 // This is a mov / orr immediate load.
2790 load_address -= 3 * Assembler::kInstrSize;
2791 DCHECK(Assembler::IsMovImmed(Memory::int32_at(load_address)));
2792 DCHECK(Assembler::IsOrrImmed(
2793 Memory::int32_at(load_address + Assembler::kInstrSize)));
2794 DCHECK(Assembler::IsOrrImmed(
2795 Memory::int32_at(load_address + 2 * Assembler::kInstrSize)));
2796 } else {
2797 // This is a small constant pool lookup.
2798 DCHECK(Assembler::IsLdrPpImmediateOffset(Memory::int32_at(load_address)));
2799 }
2800 return load_address; 2764 return load_address;
2801 } 2765 }
2802 2766
2803 2767
2804 void BackEdgeTable::PatchAt(Code* unoptimized_code, 2768 void BackEdgeTable::PatchAt(Code* unoptimized_code,
2805 Address pc, 2769 Address pc,
2806 BackEdgeState target_state, 2770 BackEdgeState target_state,
2807 Code* replacement_code) { 2771 Code* replacement_code) {
2808 Address pc_immediate_load_address = GetInterruptImmediateLoadAddress(pc); 2772 Address pc_immediate_load_address = GetInterruptImmediateLoadAddress(pc);
2809 Address branch_address = pc_immediate_load_address - Assembler::kInstrSize; 2773 Address branch_address = pc_immediate_load_address - Assembler::kInstrSize;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 DCHECK(interrupt_address == 2855 DCHECK(interrupt_address ==
2892 isolate->builtins()->OnStackReplacement()->entry()); 2856 isolate->builtins()->OnStackReplacement()->entry());
2893 return ON_STACK_REPLACEMENT; 2857 return ON_STACK_REPLACEMENT;
2894 } 2858 }
2895 2859
2896 2860
2897 } // namespace internal 2861 } // namespace internal
2898 } // namespace v8 2862 } // namespace v8
2899 2863
2900 #endif // V8_TARGET_ARCH_ARM 2864 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/register-configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698