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

Side by Side Diff: src/arm/builtins-arm.cc

Issue 1155673005: Fix issues with Arm's use of embedded constant pools (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move DataAlign implementation to common code Created 5 years, 6 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/assembler-arm-inl.h ('k') | src/arm/code-stubs-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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug.h" 10 #include "src/debug.h"
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 __ b(ne, &skip); 1159 __ b(ne, &skip);
1160 __ Ret(); 1160 __ Ret();
1161 1161
1162 __ bind(&skip); 1162 __ bind(&skip);
1163 1163
1164 // Load deoptimization data from the code object. 1164 // Load deoptimization data from the code object.
1165 // <deopt_data> = <code>[#deoptimization_data_offset] 1165 // <deopt_data> = <code>[#deoptimization_data_offset]
1166 __ ldr(r1, FieldMemOperand(r0, Code::kDeoptimizationDataOffset)); 1166 __ ldr(r1, FieldMemOperand(r0, Code::kDeoptimizationDataOffset));
1167 1167
1168 { ConstantPoolUnavailableScope constant_pool_unavailable(masm); 1168 { ConstantPoolUnavailableScope constant_pool_unavailable(masm);
1169 __ add(r0, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start
1170
1169 if (FLAG_enable_embedded_constant_pool) { 1171 if (FLAG_enable_embedded_constant_pool) {
1170 __ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r0); 1172 __ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r0);
1171 } 1173 }
1172 1174
1173 // Load the OSR entrypoint offset from the deoptimization data. 1175 // Load the OSR entrypoint offset from the deoptimization data.
1174 // <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset] 1176 // <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset]
1175 __ ldr(r1, FieldMemOperand(r1, FixedArray::OffsetOfElementAt( 1177 __ ldr(r1, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(
1176 DeoptimizationInputData::kOsrPcOffsetIndex))); 1178 DeoptimizationInputData::kOsrPcOffsetIndex)));
1177 1179
1178 // Compute the target address = code_obj + header_size + osr_offset 1180 // Compute the target address = code start + osr_offset
1179 // <entry_addr> = <code_obj> + #header_size + <osr_offset> 1181 __ add(lr, r0, Operand::SmiUntag(r1));
1180 __ add(r0, r0, Operand::SmiUntag(r1));
1181 __ add(lr, r0, Operand(Code::kHeaderSize - kHeapObjectTag));
1182 1182
1183 // And "return" to the OSR entry point of the function. 1183 // And "return" to the OSR entry point of the function.
1184 __ Ret(); 1184 __ Ret();
1185 } 1185 }
1186 } 1186 }
1187 1187
1188 1188
1189 void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) { 1189 void Builtins::Generate_OsrAfterStackCheck(MacroAssembler* masm) {
1190 // We check the stack limit as indicator that recompilation might be done. 1190 // We check the stack limit as indicator that recompilation might be done.
1191 Label ok; 1191 Label ok;
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 } 1810 }
1811 } 1811 }
1812 1812
1813 1813
1814 #undef __ 1814 #undef __
1815 1815
1816 } // namespace internal 1816 } // namespace internal
1817 } // namespace v8 1817 } // namespace v8
1818 1818
1819 #endif // V8_TARGET_ARCH_ARM 1819 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/assembler-arm-inl.h ('k') | src/arm/code-stubs-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698