OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm, | 105 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm, |
106 ExternalReference miss) { | 106 ExternalReference miss) { |
107 // Update the static counter each time a new code stub is generated. | 107 // Update the static counter each time a new code stub is generated. |
108 isolate()->counters()->code_stubs()->Increment(); | 108 isolate()->counters()->code_stubs()->Increment(); |
109 | 109 |
110 CallInterfaceDescriptor descriptor = GetCallInterfaceDescriptor(); | 110 CallInterfaceDescriptor descriptor = GetCallInterfaceDescriptor(); |
111 int param_count = descriptor.GetEnvironmentParameterCount(); | 111 int param_count = descriptor.GetEnvironmentParameterCount(); |
112 { | 112 { |
113 // Call the runtime system in a fresh internal frame. | 113 // Call the runtime system in a fresh internal frame. |
114 FrameScope scope(masm, StackFrame::INTERNAL); | 114 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
115 DCHECK(param_count == 0 || | 115 DCHECK(param_count == 0 || |
116 r3.is(descriptor.GetEnvironmentParameterRegister(param_count - 1))); | 116 r3.is(descriptor.GetEnvironmentParameterRegister(param_count - 1))); |
117 // Push arguments | 117 // Push arguments |
118 for (int i = 0; i < param_count; ++i) { | 118 for (int i = 0; i < param_count; ++i) { |
119 __ push(descriptor.GetEnvironmentParameterRegister(i)); | 119 __ push(descriptor.GetEnvironmentParameterRegister(i)); |
120 } | 120 } |
121 __ CallExternalReference(miss, param_count); | 121 __ CallExternalReference(miss, param_count); |
122 } | 122 } |
123 | 123 |
124 __ Ret(); | 124 __ Ret(); |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1151 } | 1151 } |
1152 | 1152 |
1153 // Retrieve the handler context, SP and FP. | 1153 // Retrieve the handler context, SP and FP. |
1154 __ mov(cp, Operand(pending_handler_context_address)); | 1154 __ mov(cp, Operand(pending_handler_context_address)); |
1155 __ LoadP(cp, MemOperand(cp)); | 1155 __ LoadP(cp, MemOperand(cp)); |
1156 __ mov(sp, Operand(pending_handler_sp_address)); | 1156 __ mov(sp, Operand(pending_handler_sp_address)); |
1157 __ LoadP(sp, MemOperand(sp)); | 1157 __ LoadP(sp, MemOperand(sp)); |
1158 __ mov(fp, Operand(pending_handler_fp_address)); | 1158 __ mov(fp, Operand(pending_handler_fp_address)); |
1159 __ LoadP(fp, MemOperand(fp)); | 1159 __ LoadP(fp, MemOperand(fp)); |
1160 | 1160 |
1161 // If the handler is a JS frame, restore the context to the frame. | 1161 // If the handler is a JS frame, restore the context to the frame. Note that |
1162 // (kind == ENTRY) == (fp == 0) == (cp == 0), so we could test either fp | 1162 // the context will be set to (cp == 0) for non-JS frames. |
1163 // or cp. | |
1164 Label skip; | 1163 Label skip; |
1165 __ cmpi(cp, Operand::Zero()); | 1164 __ cmpi(cp, Operand::Zero()); |
1166 __ beq(&skip); | 1165 __ beq(&skip); |
1167 __ StoreP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 1166 __ StoreP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
1168 __ bind(&skip); | 1167 __ bind(&skip); |
1169 | 1168 |
1170 // Compute the handler entry address and jump to it. | 1169 // Compute the handler entry address and jump to it. |
| 1170 ConstantPoolUnavailableScope constant_pool_unavailable(masm); |
1171 __ mov(r4, Operand(pending_handler_code_address)); | 1171 __ mov(r4, Operand(pending_handler_code_address)); |
1172 __ LoadP(r4, MemOperand(r4)); | 1172 __ LoadP(r4, MemOperand(r4)); |
1173 __ mov(r5, Operand(pending_handler_offset_address)); | 1173 __ mov(r5, Operand(pending_handler_offset_address)); |
1174 __ LoadP(r5, MemOperand(r5)); | 1174 __ LoadP(r5, MemOperand(r5)); |
1175 __ addi(r4, r4, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start | 1175 __ addi(r4, r4, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start |
| 1176 if (FLAG_enable_embedded_constant_pool) { |
| 1177 __ LoadTargetConstantPoolPointerRegister(r4); |
| 1178 } |
1176 __ add(ip, r4, r5); | 1179 __ add(ip, r4, r5); |
1177 __ Jump(ip); | 1180 __ Jump(ip); |
1178 } | 1181 } |
1179 | 1182 |
1180 | 1183 |
1181 void JSEntryStub::Generate(MacroAssembler* masm) { | 1184 void JSEntryStub::Generate(MacroAssembler* masm) { |
1182 // r3: code entry | 1185 // r3: code entry |
1183 // r4: function | 1186 // r4: function |
1184 // r5: receiver | 1187 // r5: receiver |
1185 // r6: argc | 1188 // r6: argc |
(...skipping 21 matching lines...) Expand all Loading... |
1207 // __ lwz(r7, MemOperand(sp, offset_to_argv)); | 1210 // __ lwz(r7, MemOperand(sp, offset_to_argv)); |
1208 | 1211 |
1209 // Push a frame with special values setup to mark it as an entry frame. | 1212 // Push a frame with special values setup to mark it as an entry frame. |
1210 // r3: code entry | 1213 // r3: code entry |
1211 // r4: function | 1214 // r4: function |
1212 // r5: receiver | 1215 // r5: receiver |
1213 // r6: argc | 1216 // r6: argc |
1214 // r7: argv | 1217 // r7: argv |
1215 __ li(r0, Operand(-1)); // Push a bad frame pointer to fail if it is used. | 1218 __ li(r0, Operand(-1)); // Push a bad frame pointer to fail if it is used. |
1216 __ push(r0); | 1219 __ push(r0); |
| 1220 if (FLAG_enable_embedded_constant_pool) { |
| 1221 __ li(kConstantPoolRegister, Operand::Zero()); |
| 1222 __ push(kConstantPoolRegister); |
| 1223 } |
1217 int marker = type(); | 1224 int marker = type(); |
1218 __ LoadSmiLiteral(r0, Smi::FromInt(marker)); | 1225 __ LoadSmiLiteral(r0, Smi::FromInt(marker)); |
1219 __ push(r0); | 1226 __ push(r0); |
1220 __ push(r0); | 1227 __ push(r0); |
1221 // Save copies of the top frame descriptor on the stack. | 1228 // Save copies of the top frame descriptor on the stack. |
1222 __ mov(r8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); | 1229 __ mov(r8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate()))); |
1223 __ LoadP(r0, MemOperand(r8)); | 1230 __ LoadP(r0, MemOperand(r8)); |
1224 __ push(r0); | 1231 __ push(r0); |
1225 | 1232 |
1226 // Set up frame pointer for the frame to be pushed. | 1233 // Set up frame pointer for the frame to be pushed. |
(...skipping 16 matching lines...) Expand all Loading... |
1243 __ push(ip); // frame-type | 1250 __ push(ip); // frame-type |
1244 | 1251 |
1245 // Jump to a faked try block that does the invoke, with a faked catch | 1252 // Jump to a faked try block that does the invoke, with a faked catch |
1246 // block that sets the pending exception. | 1253 // block that sets the pending exception. |
1247 __ b(&invoke); | 1254 __ b(&invoke); |
1248 | 1255 |
1249 __ bind(&handler_entry); | 1256 __ bind(&handler_entry); |
1250 handler_offset_ = handler_entry.pos(); | 1257 handler_offset_ = handler_entry.pos(); |
1251 // Caught exception: Store result (exception) in the pending exception | 1258 // Caught exception: Store result (exception) in the pending exception |
1252 // field in the JSEnv and return a failure sentinel. Coming in here the | 1259 // field in the JSEnv and return a failure sentinel. Coming in here the |
1253 // fp will be invalid because the PushTryHandler below sets it to 0 to | 1260 // fp will be invalid because the PushStackHandler below sets it to 0 to |
1254 // signal the existence of the JSEntry frame. | 1261 // signal the existence of the JSEntry frame. |
1255 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, | 1262 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, |
1256 isolate()))); | 1263 isolate()))); |
1257 | 1264 |
1258 __ StoreP(r3, MemOperand(ip)); | 1265 __ StoreP(r3, MemOperand(ip)); |
1259 __ LoadRoot(r3, Heap::kExceptionRootIndex); | 1266 __ LoadRoot(r3, Heap::kExceptionRootIndex); |
1260 __ b(&exit); | 1267 __ b(&exit); |
1261 | 1268 |
1262 // Invoke: Link this frame into the handler chain. There's only one | 1269 // Invoke: Link this frame into the handler chain. |
1263 // handler block in this code object, so its index is 0. | |
1264 __ bind(&invoke); | 1270 __ bind(&invoke); |
1265 // Must preserve r0-r4, r5-r7 are available. (needs update for PPC) | 1271 // Must preserve r3-r7. |
1266 __ PushTryHandler(StackHandler::JS_ENTRY, 0); | 1272 __ PushStackHandler(); |
1267 // If an exception not caught by another handler occurs, this handler | 1273 // If an exception not caught by another handler occurs, this handler |
1268 // returns control to the code after the b(&invoke) above, which | 1274 // returns control to the code after the b(&invoke) above, which |
1269 // restores all kCalleeSaved registers (including cp and fp) to their | 1275 // restores all kCalleeSaved registers (including cp and fp) to their |
1270 // saved values before returning a failure to C. | 1276 // saved values before returning a failure to C. |
1271 | 1277 |
1272 // Clear any pending exceptions. | 1278 // Clear any pending exceptions. |
1273 __ mov(r8, Operand(isolate()->factory()->the_hole_value())); | 1279 __ mov(r8, Operand(isolate()->factory()->the_hole_value())); |
1274 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, | 1280 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, |
1275 isolate()))); | 1281 isolate()))); |
1276 __ StoreP(r8, MemOperand(ip)); | 1282 __ StoreP(r8, MemOperand(ip)); |
(...skipping 18 matching lines...) Expand all Loading... |
1295 } | 1301 } |
1296 __ LoadP(ip, MemOperand(ip)); // deref address | 1302 __ LoadP(ip, MemOperand(ip)); // deref address |
1297 | 1303 |
1298 // Branch and link to JSEntryTrampoline. | 1304 // Branch and link to JSEntryTrampoline. |
1299 // the address points to the start of the code object, skip the header | 1305 // the address points to the start of the code object, skip the header |
1300 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1306 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1301 __ mtctr(ip); | 1307 __ mtctr(ip); |
1302 __ bctrl(); // make the call | 1308 __ bctrl(); // make the call |
1303 | 1309 |
1304 // Unlink this frame from the handler chain. | 1310 // Unlink this frame from the handler chain. |
1305 __ PopTryHandler(); | 1311 __ PopStackHandler(); |
1306 | 1312 |
1307 __ bind(&exit); // r3 holds result | 1313 __ bind(&exit); // r3 holds result |
1308 // Check if the current stack frame is marked as the outermost JS frame. | 1314 // Check if the current stack frame is marked as the outermost JS frame. |
1309 Label non_outermost_js_2; | 1315 Label non_outermost_js_2; |
1310 __ pop(r8); | 1316 __ pop(r8); |
1311 __ CmpSmiLiteral(r8, Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME), r0); | 1317 __ CmpSmiLiteral(r8, Smi::FromInt(StackFrame::OUTERMOST_JSENTRY_FRAME), r0); |
1312 __ bne(&non_outermost_js_2); | 1318 __ bne(&non_outermost_js_2); |
1313 __ mov(r9, Operand::Zero()); | 1319 __ mov(r9, Operand::Zero()); |
1314 __ mov(r8, Operand(ExternalReference(js_entry_sp))); | 1320 __ mov(r8, Operand(ExternalReference(js_entry_sp))); |
1315 __ StoreP(r9, MemOperand(r8)); | 1321 __ StoreP(r9, MemOperand(r8)); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1517 | 1523 |
1518 // Slow-case. Tail call builtin. | 1524 // Slow-case. Tail call builtin. |
1519 __ bind(&slow); | 1525 __ bind(&slow); |
1520 if (!ReturnTrueFalseObject()) { | 1526 if (!ReturnTrueFalseObject()) { |
1521 if (HasArgsInRegisters()) { | 1527 if (HasArgsInRegisters()) { |
1522 __ Push(r3, r4); | 1528 __ Push(r3, r4); |
1523 } | 1529 } |
1524 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 1530 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
1525 } else { | 1531 } else { |
1526 { | 1532 { |
1527 FrameScope scope(masm, StackFrame::INTERNAL); | 1533 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
1528 __ Push(r3, r4); | 1534 __ Push(r3, r4); |
1529 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); | 1535 __ InvokeBuiltin(Builtins::INSTANCE_OF, CALL_FUNCTION); |
1530 } | 1536 } |
1531 if (CpuFeatures::IsSupported(ISELECT)) { | 1537 if (CpuFeatures::IsSupported(ISELECT)) { |
1532 __ cmpi(r3, Operand::Zero()); | 1538 __ cmpi(r3, Operand::Zero()); |
1533 __ LoadRoot(r3, Heap::kTrueValueRootIndex); | 1539 __ LoadRoot(r3, Heap::kTrueValueRootIndex); |
1534 __ LoadRoot(r4, Heap::kFalseValueRootIndex); | 1540 __ LoadRoot(r4, Heap::kFalseValueRootIndex); |
1535 __ isel(eq, r3, r3, r4); | 1541 __ isel(eq, r3, r3, r4); |
1536 } else { | 1542 } else { |
1537 Label true_value, done; | 1543 Label true_value, done; |
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2589 if (!FLAG_pretenuring_call_new) { | 2595 if (!FLAG_pretenuring_call_new) { |
2590 // Make sure the function is the Array() function. | 2596 // Make sure the function is the Array() function. |
2591 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r7); | 2597 __ LoadGlobalFunction(Context::ARRAY_FUNCTION_INDEX, r7); |
2592 __ cmp(r4, r7); | 2598 __ cmp(r4, r7); |
2593 __ bne(¬_array_function); | 2599 __ bne(¬_array_function); |
2594 | 2600 |
2595 // The target function is the Array constructor, | 2601 // The target function is the Array constructor, |
2596 // Create an AllocationSite if we don't already have it, store it in the | 2602 // Create an AllocationSite if we don't already have it, store it in the |
2597 // slot. | 2603 // slot. |
2598 { | 2604 { |
2599 FrameScope scope(masm, StackFrame::INTERNAL); | 2605 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
2600 | 2606 |
2601 // Arguments register must be smi-tagged to call out. | 2607 // Arguments register must be smi-tagged to call out. |
2602 __ SmiTag(r3); | 2608 __ SmiTag(r3); |
2603 __ Push(r6, r5, r4, r3); | 2609 __ Push(r6, r5, r4, r3); |
2604 | 2610 |
2605 CreateAllocationSiteStub create_stub(masm->isolate()); | 2611 CreateAllocationSiteStub create_stub(masm->isolate()); |
2606 __ CallStub(&create_stub); | 2612 __ CallStub(&create_stub); |
2607 | 2613 |
2608 __ Pop(r6, r5, r4, r3); | 2614 __ Pop(r6, r5, r4, r3); |
2609 __ SmiUntag(r3); | 2615 __ SmiUntag(r3); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2675 __ li(r5, Operand::Zero()); | 2681 __ li(r5, Operand::Zero()); |
2676 __ GetBuiltinFunction(r4, Builtins::CALL_NON_FUNCTION); | 2682 __ GetBuiltinFunction(r4, Builtins::CALL_NON_FUNCTION); |
2677 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), | 2683 __ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(), |
2678 RelocInfo::CODE_TARGET); | 2684 RelocInfo::CODE_TARGET); |
2679 } | 2685 } |
2680 | 2686 |
2681 | 2687 |
2682 static void EmitWrapCase(MacroAssembler* masm, int argc, Label* cont) { | 2688 static void EmitWrapCase(MacroAssembler* masm, int argc, Label* cont) { |
2683 // Wrap the receiver and patch it back onto the stack. | 2689 // Wrap the receiver and patch it back onto the stack. |
2684 { | 2690 { |
2685 FrameScope frame_scope(masm, StackFrame::INTERNAL); | 2691 FrameAndConstantPoolScope frame_scope(masm, StackFrame::INTERNAL); |
2686 __ Push(r4, r6); | 2692 __ Push(r4, r6); |
2687 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 2693 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
2688 __ pop(r4); | 2694 __ pop(r4); |
2689 } | 2695 } |
2690 __ StoreP(r3, MemOperand(sp, argc * kPointerSize), r0); | 2696 __ StoreP(r3, MemOperand(sp, argc * kPointerSize), r0); |
2691 __ b(cont); | 2697 __ b(cont); |
2692 } | 2698 } |
2693 | 2699 |
2694 | 2700 |
2695 static void CallFunctionNoFeedback(MacroAssembler* masm, int argc, | 2701 static void CallFunctionNoFeedback(MacroAssembler* masm, int argc, |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 // Update stats. | 2999 // Update stats. |
2994 __ LoadP(r7, FieldMemOperand(r5, with_types_offset)); | 3000 __ LoadP(r7, FieldMemOperand(r5, with_types_offset)); |
2995 __ AddSmiLiteral(r7, r7, Smi::FromInt(1), r0); | 3001 __ AddSmiLiteral(r7, r7, Smi::FromInt(1), r0); |
2996 __ StoreP(r7, FieldMemOperand(r5, with_types_offset), r0); | 3002 __ StoreP(r7, FieldMemOperand(r5, with_types_offset), r0); |
2997 | 3003 |
2998 // Store the function. Use a stub since we need a frame for allocation. | 3004 // Store the function. Use a stub since we need a frame for allocation. |
2999 // r5 - vector | 3005 // r5 - vector |
3000 // r6 - slot | 3006 // r6 - slot |
3001 // r4 - function | 3007 // r4 - function |
3002 { | 3008 { |
3003 FrameScope scope(masm, StackFrame::INTERNAL); | 3009 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
3004 CreateWeakCellStub create_stub(masm->isolate()); | 3010 CreateWeakCellStub create_stub(masm->isolate()); |
3005 __ Push(r4); | 3011 __ Push(r4); |
3006 __ CallStub(&create_stub); | 3012 __ CallStub(&create_stub); |
3007 __ Pop(r4); | 3013 __ Pop(r4); |
3008 } | 3014 } |
3009 | 3015 |
3010 __ b(&have_js_function); | 3016 __ b(&have_js_function); |
3011 | 3017 |
3012 // We are here because tracing is on or we encountered a MISS case we can't | 3018 // We are here because tracing is on or we encountered a MISS case we can't |
3013 // handle here. | 3019 // handle here. |
3014 __ bind(&miss); | 3020 __ bind(&miss); |
3015 GenerateMiss(masm); | 3021 GenerateMiss(masm); |
3016 | 3022 |
3017 // the slow case | 3023 // the slow case |
3018 __ bind(&slow_start); | 3024 __ bind(&slow_start); |
3019 // Check that the function is really a JavaScript function. | 3025 // Check that the function is really a JavaScript function. |
3020 // r4: pushed function (to be verified) | 3026 // r4: pushed function (to be verified) |
3021 __ JumpIfSmi(r4, &non_function); | 3027 __ JumpIfSmi(r4, &non_function); |
3022 | 3028 |
3023 // Goto slow case if we do not have a function. | 3029 // Goto slow case if we do not have a function. |
3024 __ CompareObjectType(r4, r7, r7, JS_FUNCTION_TYPE); | 3030 __ CompareObjectType(r4, r7, r7, JS_FUNCTION_TYPE); |
3025 __ bne(&slow); | 3031 __ bne(&slow); |
3026 __ b(&have_js_function); | 3032 __ b(&have_js_function); |
3027 } | 3033 } |
3028 | 3034 |
3029 | 3035 |
3030 void CallICStub::GenerateMiss(MacroAssembler* masm) { | 3036 void CallICStub::GenerateMiss(MacroAssembler* masm) { |
3031 FrameScope scope(masm, StackFrame::INTERNAL); | 3037 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
3032 | 3038 |
3033 // Push the function and feedback info. | 3039 // Push the function and feedback info. |
3034 __ Push(r4, r5, r6); | 3040 __ Push(r4, r5, r6); |
3035 | 3041 |
3036 // Call the entry. | 3042 // Call the entry. |
3037 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss | 3043 IC::UtilityId id = GetICState() == DEFAULT ? IC::kCallIC_Miss |
3038 : IC::kCallIC_Customization_Miss; | 3044 : IC::kCallIC_Customization_Miss; |
3039 | 3045 |
3040 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); | 3046 ExternalReference miss = ExternalReference(IC_Utility(id), masm->isolate()); |
3041 __ CallExternalReference(miss, 3); | 3047 __ CallExternalReference(miss, 3); |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3990 GenerateMiss(masm); | 3996 GenerateMiss(masm); |
3991 } | 3997 } |
3992 | 3998 |
3993 | 3999 |
3994 void CompareICStub::GenerateMiss(MacroAssembler* masm) { | 4000 void CompareICStub::GenerateMiss(MacroAssembler* masm) { |
3995 { | 4001 { |
3996 // Call the runtime system in a fresh internal frame. | 4002 // Call the runtime system in a fresh internal frame. |
3997 ExternalReference miss = | 4003 ExternalReference miss = |
3998 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate()); | 4004 ExternalReference(IC_Utility(IC::kCompareIC_Miss), isolate()); |
3999 | 4005 |
4000 FrameScope scope(masm, StackFrame::INTERNAL); | 4006 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
4001 __ Push(r4, r3); | 4007 __ Push(r4, r3); |
4002 __ Push(r4, r3); | 4008 __ Push(r4, r3); |
4003 __ LoadSmiLiteral(r0, Smi::FromInt(op())); | 4009 __ LoadSmiLiteral(r0, Smi::FromInt(op())); |
4004 __ push(r0); | 4010 __ push(r0); |
4005 __ CallExternalReference(miss, 3); | 4011 __ CallExternalReference(miss, 3); |
4006 // Compute the entry point of the rewritten stub. | 4012 // Compute the entry point of the rewritten stub. |
4007 __ addi(r5, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); | 4013 __ addi(r5, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); |
4008 // Restore registers. | 4014 // Restore registers. |
4009 __ Pop(r4, r3); | 4015 __ Pop(r4, r3); |
4010 } | 4016 } |
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5588 kStackUnwindSpace, NULL, | 5594 kStackUnwindSpace, NULL, |
5589 MemOperand(fp, 6 * kPointerSize), NULL); | 5595 MemOperand(fp, 6 * kPointerSize), NULL); |
5590 } | 5596 } |
5591 | 5597 |
5592 | 5598 |
5593 #undef __ | 5599 #undef __ |
5594 } | 5600 } |
5595 } // namespace v8::internal | 5601 } // namespace v8::internal |
5596 | 5602 |
5597 #endif // V8_TARGET_ARCH_PPC | 5603 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |