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

Side by Side Diff: src/builtins/arm/builtins-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/arm/macro-assembler-arm.cc ('k') | src/compiler/arm/code-generator-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 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/codegen.h" 8 #include "src/codegen.h"
9 #include "src/counters.h" 9 #include "src/counters.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 } 844 }
845 845
846 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, 846 static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
847 bool is_construct) { 847 bool is_construct) {
848 // Called from Generate_JS_Entry 848 // Called from Generate_JS_Entry
849 // r0: new.target 849 // r0: new.target
850 // r1: function 850 // r1: function
851 // r2: receiver 851 // r2: receiver
852 // r3: argc 852 // r3: argc
853 // r4: argv 853 // r4: argv
854 // r5-r6, r8 (if !FLAG_enable_embedded_constant_pool) and cp may be clobbered 854 // r5-r6, r8 and cp may be clobbered
855 ProfileEntryHookStub::MaybeCallEntryHook(masm); 855 ProfileEntryHookStub::MaybeCallEntryHook(masm);
856 856
857 // Enter an internal frame. 857 // Enter an internal frame.
858 { 858 {
859 FrameScope scope(masm, StackFrame::INTERNAL); 859 FrameScope scope(masm, StackFrame::INTERNAL);
860 860
861 // Setup the context (we need to use the caller context from the isolate). 861 // Setup the context (we need to use the caller context from the isolate).
862 ExternalReference context_address(Isolate::kContextAddress, 862 ExternalReference context_address(Isolate::kContextAddress,
863 masm->isolate()); 863 masm->isolate());
864 __ mov(cp, Operand(context_address)); 864 __ mov(cp, Operand(context_address));
(...skipping 29 matching lines...) Expand all
894 894
895 // Setup new.target and argc. 895 // Setup new.target and argc.
896 __ mov(r0, Operand(r3)); 896 __ mov(r0, Operand(r3));
897 __ mov(r3, Operand(r5)); 897 __ mov(r3, Operand(r5));
898 898
899 // Initialize all JavaScript callee-saved registers, since they will be seen 899 // Initialize all JavaScript callee-saved registers, since they will be seen
900 // by the garbage collector as part of handlers. 900 // by the garbage collector as part of handlers.
901 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex); 901 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex);
902 __ mov(r5, Operand(r4)); 902 __ mov(r5, Operand(r4));
903 __ mov(r6, Operand(r4)); 903 __ mov(r6, Operand(r4));
904 if (!FLAG_enable_embedded_constant_pool) { 904 __ mov(r8, Operand(r4));
905 __ mov(r8, Operand(r4));
906 }
907 if (kR9Available == 1) { 905 if (kR9Available == 1) {
908 __ mov(r9, Operand(r4)); 906 __ mov(r9, Operand(r4));
909 } 907 }
910 908
911 // Invoke the code. 909 // Invoke the code.
912 Handle<Code> builtin = is_construct 910 Handle<Code> builtin = is_construct
913 ? masm->isolate()->builtins()->Construct() 911 ? masm->isolate()->builtins()->Construct()
914 : masm->isolate()->builtins()->Call(); 912 : masm->isolate()->builtins()->Call();
915 __ Call(builtin, RelocInfo::CODE_TARGET); 913 __ Call(builtin, RelocInfo::CODE_TARGET);
916 914
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 } 1688 }
1691 1689
1692 // Load deoptimization data from the code object. 1690 // Load deoptimization data from the code object.
1693 // <deopt_data> = <code>[#deoptimization_data_offset] 1691 // <deopt_data> = <code>[#deoptimization_data_offset]
1694 __ ldr(r1, FieldMemOperand(r0, Code::kDeoptimizationDataOffset)); 1692 __ ldr(r1, FieldMemOperand(r0, Code::kDeoptimizationDataOffset));
1695 1693
1696 { 1694 {
1697 ConstantPoolUnavailableScope constant_pool_unavailable(masm); 1695 ConstantPoolUnavailableScope constant_pool_unavailable(masm);
1698 __ add(r0, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start 1696 __ add(r0, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start
1699 1697
1700 if (FLAG_enable_embedded_constant_pool) {
1701 __ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r0);
1702 }
1703
1704 // Load the OSR entrypoint offset from the deoptimization data. 1698 // Load the OSR entrypoint offset from the deoptimization data.
1705 // <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset] 1699 // <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset]
1706 __ ldr(r1, FieldMemOperand( 1700 __ ldr(r1, FieldMemOperand(
1707 r1, FixedArray::OffsetOfElementAt( 1701 r1, FixedArray::OffsetOfElementAt(
1708 DeoptimizationInputData::kOsrPcOffsetIndex))); 1702 DeoptimizationInputData::kOsrPcOffsetIndex)));
1709 1703
1710 // Compute the target address = code start + osr_offset 1704 // Compute the target address = code start + osr_offset
1711 __ add(lr, r0, Operand::SmiUntag(r1)); 1705 __ add(lr, r0, Operand::SmiUntag(r1));
1712 1706
1713 // And "return" to the OSR entry point of the function. 1707 // And "return" to the OSR entry point of the function.
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 { 1945 {
1952 __ str(r3, MemOperand(sp, 0)); 1946 __ str(r3, MemOperand(sp, 0));
1953 __ TailCallRuntime(Runtime::kThrowNotConstructor); 1947 __ TailCallRuntime(Runtime::kThrowNotConstructor);
1954 } 1948 }
1955 } 1949 }
1956 1950
1957 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { 1951 static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) {
1958 __ SmiTag(r0); 1952 __ SmiTag(r0);
1959 __ mov(r4, Operand(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR))); 1953 __ mov(r4, Operand(StackFrame::TypeToMarker(StackFrame::ARGUMENTS_ADAPTOR)));
1960 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | 1954 __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() |
1961 (FLAG_enable_embedded_constant_pool ? pp.bit() : 0) |
1962 fp.bit() | lr.bit()); 1955 fp.bit() | lr.bit());
1963 __ add(fp, sp, 1956 __ add(fp, sp,
1964 Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); 1957 Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize));
1965 } 1958 }
1966 1959
1967 static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) { 1960 static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) {
1968 // ----------- S t a t e ------------- 1961 // ----------- S t a t e -------------
1969 // -- r0 : result being passed through 1962 // -- r0 : result being passed through
1970 // ----------------------------------- 1963 // -----------------------------------
1971 // Get the number of arguments passed (as a smi), tear down the frame and 1964 // Get the number of arguments passed (as a smi), tear down the frame and
(...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
3029 } 3022 }
3030 // Now jump to the instructions of the returned code object. 3023 // Now jump to the instructions of the returned code object.
3031 __ Jump(r8); 3024 __ Jump(r8);
3032 } 3025 }
3033 #undef __ 3026 #undef __
3034 3027
3035 } // namespace internal 3028 } // namespace internal
3036 } // namespace v8 3029 } // namespace v8
3037 3030
3038 #endif // V8_TARGET_ARCH_ARM 3031 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698