OLD | NEW |
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 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 // the context will be set to (cp == 0) for non-JS frames. | 1093 // the context will be set to (cp == 0) for non-JS frames. |
1094 __ cmp(cp, Operand(0)); | 1094 __ cmp(cp, Operand(0)); |
1095 __ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne); | 1095 __ str(cp, MemOperand(fp, StandardFrameConstants::kContextOffset), ne); |
1096 | 1096 |
1097 // Compute the handler entry address and jump to it. | 1097 // Compute the handler entry address and jump to it. |
1098 ConstantPoolUnavailableScope constant_pool_unavailable(masm); | 1098 ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
1099 __ mov(r1, Operand(pending_handler_code_address)); | 1099 __ mov(r1, Operand(pending_handler_code_address)); |
1100 __ ldr(r1, MemOperand(r1)); | 1100 __ ldr(r1, MemOperand(r1)); |
1101 __ mov(r2, Operand(pending_handler_offset_address)); | 1101 __ mov(r2, Operand(pending_handler_offset_address)); |
1102 __ ldr(r2, MemOperand(r2)); | 1102 __ ldr(r2, MemOperand(r2)); |
1103 if (FLAG_enable_embedded_constant_pool) { | 1103 if (FLAG_enable_ool_constant_pool) { |
1104 __ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r1); | 1104 __ ldr(pp, FieldMemOperand(r1, Code::kConstantPoolOffset)); |
1105 } | 1105 } |
1106 __ add(r1, r1, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1106 __ add(r1, r1, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1107 __ add(pc, r1, r2); | 1107 __ add(pc, r1, r2); |
1108 } | 1108 } |
1109 | 1109 |
1110 | 1110 |
1111 void JSEntryStub::Generate(MacroAssembler* masm) { | 1111 void JSEntryStub::Generate(MacroAssembler* masm) { |
1112 // r0: code entry | 1112 // r0: code entry |
1113 // r1: function | 1113 // r1: function |
1114 // r2: receiver | 1114 // r2: receiver |
(...skipping 26 matching lines...) Expand all Loading... |
1141 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize; | 1141 offset_to_argv += kNumDoubleCalleeSaved * kDoubleSize; |
1142 __ ldr(r4, MemOperand(sp, offset_to_argv)); | 1142 __ ldr(r4, MemOperand(sp, offset_to_argv)); |
1143 | 1143 |
1144 // Push a frame with special values setup to mark it as an entry frame. | 1144 // Push a frame with special values setup to mark it as an entry frame. |
1145 // r0: code entry | 1145 // r0: code entry |
1146 // r1: function | 1146 // r1: function |
1147 // r2: receiver | 1147 // r2: receiver |
1148 // r3: argc | 1148 // r3: argc |
1149 // r4: argv | 1149 // r4: argv |
1150 int marker = type(); | 1150 int marker = type(); |
1151 if (FLAG_enable_embedded_constant_pool) { | 1151 if (FLAG_enable_ool_constant_pool) { |
1152 __ mov(r8, Operand::Zero()); | 1152 __ mov(r8, Operand(isolate()->factory()->empty_constant_pool_array())); |
1153 } | 1153 } |
1154 __ mov(r7, Operand(Smi::FromInt(marker))); | 1154 __ mov(r7, Operand(Smi::FromInt(marker))); |
1155 __ mov(r6, Operand(Smi::FromInt(marker))); | 1155 __ mov(r6, Operand(Smi::FromInt(marker))); |
1156 __ mov(r5, | 1156 __ mov(r5, |
1157 Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); | 1157 Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); |
1158 __ ldr(r5, MemOperand(r5)); | 1158 __ ldr(r5, MemOperand(r5)); |
1159 __ mov(ip, Operand(-1)); // Push a bad frame pointer to fail if it is used. | 1159 __ mov(ip, Operand(-1)); // Push a bad frame pointer to fail if it is used. |
1160 __ stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | | 1160 __ stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | |
1161 (FLAG_enable_embedded_constant_pool ? r8.bit() : 0) | | 1161 (FLAG_enable_ool_constant_pool ? r8.bit() : 0) | |
1162 ip.bit()); | 1162 ip.bit()); |
1163 | 1163 |
1164 // Set up frame pointer for the frame to be pushed. | 1164 // Set up frame pointer for the frame to be pushed. |
1165 __ add(fp, sp, Operand(-EntryFrameConstants::kCallerFPOffset)); | 1165 __ add(fp, sp, Operand(-EntryFrameConstants::kCallerFPOffset)); |
1166 | 1166 |
1167 // If this is the outermost JS call, set js_entry_sp value. | 1167 // If this is the outermost JS call, set js_entry_sp value. |
1168 Label non_outermost_js; | 1168 Label non_outermost_js; |
1169 ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate()); | 1169 ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate()); |
1170 __ mov(r5, Operand(ExternalReference(js_entry_sp))); | 1170 __ mov(r5, Operand(ExternalReference(js_entry_sp))); |
1171 __ ldr(r6, MemOperand(r5)); | 1171 __ ldr(r6, MemOperand(r5)); |
1172 __ cmp(r6, Operand::Zero()); | 1172 __ cmp(r6, Operand::Zero()); |
(...skipping 4186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5359 MemOperand(fp, 6 * kPointerSize), NULL); | 5359 MemOperand(fp, 6 * kPointerSize), NULL); |
5360 } | 5360 } |
5361 | 5361 |
5362 | 5362 |
5363 #undef __ | 5363 #undef __ |
5364 | 5364 |
5365 } // namespace internal | 5365 } // namespace internal |
5366 } // namespace v8 | 5366 } // namespace v8 |
5367 | 5367 |
5368 #endif // V8_TARGET_ARCH_ARM | 5368 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |