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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 1131783003: Embedded constant pools. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 // the context will be set to (cp == 0) for non-JS frames. 1077 // the context will be set to (cp == 0) for non-JS frames.
1078 __ cmp(cp, Operand(0)); 1078 __ cmp(cp, Operand(0));
1079 __ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne); 1079 __ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne);
1080 1080
1081 // Compute the handler entry address and jump to it. 1081 // Compute the handler entry address and jump to it.
1082 ConstantPoolUnavailableScope constant_pool_unavailable(masm); 1082 ConstantPoolUnavailableScope constant_pool_unavailable(masm);
1083 __ mov(r1, Operand(pending_handler_code_address)); 1083 __ mov(r1, Operand(pending_handler_code_address));
1084 __ ldr(r1, MemOperand(r1)); 1084 __ ldr(r1, MemOperand(r1));
1085 __ mov(r2, Operand(pending_handler_offset_address)); 1085 __ mov(r2, Operand(pending_handler_offset_address));
1086 __ ldr(r2, MemOperand(r2)); 1086 __ ldr(r2, MemOperand(r2));
1087 if (FLAG_enable_ool_constant_pool) { 1087 if (FLAG_enable_embedded_constant_pool) {
1088 __ ldr(pp, FieldMemOperand(r1, Code::kConstantPoolOffset)); 1088 __ LoadTargetConstantPoolPointerRegister(r1);
1089 } 1089 }
1090 __ add(r1, r1, Operand(Code::kHeaderSize - kHeapObjectTag)); 1090 __ add(r1, r1, Operand(Code::kHeaderSize - kHeapObjectTag));
1091 __ add(pc, r1, r2); 1091 __ add(pc, r1, r2);
1092 } 1092 }
1093 1093
1094 1094
1095 void JSEntryStub::Generate(MacroAssembler* masm) { 1095 void JSEntryStub::Generate(MacroAssembler* masm) {
1096 // r0: code entry 1096 // r0: code entry
1097 // r1: function 1097 // r1: function
1098 // r2: receiver 1098 // r2: receiver
(...skipping 26 matching lines...) Expand all
1125 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize; 1125 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize;
1126 __ ldr(r4, MemOperand(sp, offset_to_argv)); 1126 __ ldr(r4, MemOperand(sp, offset_to_argv));
1127 1127
1128 // Push a frame with special values setup to mark it as an entry frame. 1128 // Push a frame with special values setup to mark it as an entry frame.
1129 // r0: code entry 1129 // r0: code entry
1130 // r1: function 1130 // r1: function
1131 // r2: receiver 1131 // r2: receiver
1132 // r3: argc 1132 // r3: argc
1133 // r4: argv 1133 // r4: argv
1134 int marker = type(); 1134 int marker = type();
1135 if (FLAG_enable_ool_constant_pool) { 1135 if (FLAG_enable_embedded_constant_pool) {
1136 __ mov(r8, Operand(isolate()->factory()->empty_constant_pool_array())); 1136 __ mov(r8, Operand::Zero());
1137 } 1137 }
1138 __ mov(r7, Operand(Smi::FromInt(marker))); 1138 __ mov(r7, Operand(Smi::FromInt(marker)));
1139 __ mov(r6, Operand(Smi::FromInt(marker))); 1139 __ mov(r6, Operand(Smi::FromInt(marker)));
1140 __ mov(r5, 1140 __ mov(r5,
1141 Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); 1141 Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
1142 __ ldr(r5, MemOperand(r5)); 1142 __ ldr(r5, MemOperand(r5));
1143 __ mov(ip, Operand(-1)); // Push a bad frame pointer to fail if it is used. 1143 __ mov(ip, Operand(-1)); // Push a bad frame pointer to fail if it is used.
1144 __ stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | 1144 __ stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() |
1145 (FLAG_enable_ool_constant_pool ? r8.bit() : 0) | 1145 (FLAG_enable_embedded_constant_pool ? r8.bit() : 0) |
1146 ip.bit()); 1146 ip.bit());
1147 1147
1148 // Set up frame pointer for the frame to be pushed. 1148 // Set up frame pointer for the frame to be pushed.
1149 __ add(fp, sp, Operand(-EntryFrameConstants::kCallerFPOffset)); 1149 __ add(fp, sp, Operand(-EntryFrameConstants::kCallerFPOffset));
1150 1150
1151 // If this is the outermost JS call, set js_entry_sp value. 1151 // If this is the outermost JS call, set js_entry_sp value.
1152 Label non_outermost_js; 1152 Label non_outermost_js;
1153 ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate()); 1153 ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate());
1154 __ mov(r5, Operand(ExternalReference(js_entry_sp))); 1154 __ mov(r5, Operand(ExternalReference(js_entry_sp)));
1155 __ ldr(r6, MemOperand(r5)); 1155 __ ldr(r6, MemOperand(r5));
1156 __ cmp(r6, Operand::Zero()); 1156 __ cmp(r6, Operand::Zero());
(...skipping 4136 matching lines...) Expand 10 before | Expand all | Expand 10 after
5293 kStackUnwindSpace, NULL, 5293 kStackUnwindSpace, NULL,
5294 MemOperand(fp, 6 * kPointerSize), NULL); 5294 MemOperand(fp, 6 * kPointerSize), NULL);
5295 } 5295 }
5296 5296
5297 5297
5298 #undef __ 5298 #undef __
5299 5299
5300 } } // namespace v8::internal 5300 } } // namespace v8::internal
5301 5301
5302 #endif // V8_TARGET_ARCH_ARM 5302 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698