Lines Matching full:__
16 #define __ ACCESS_MASM(masm) macro
29 __ AssertFunction(r4); in Generate_Adaptor()
35 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); in Generate_Adaptor()
40 __ addi(r3, r3, Operand(num_extra_args + 1)); in Generate_Adaptor()
43 __ SmiTag(r3); in Generate_Adaptor()
44 __ Push(r3, r4, r6); in Generate_Adaptor()
45 __ SmiUntag(r3); in Generate_Adaptor()
47 __ JumpToExternalReference(ExternalReference(address, masm->isolate()), in Generate_Adaptor()
55 __ LoadNativeContextSlot(Context::INTERNAL_ARRAY_FUNCTION_INDEX, result); in GenerateLoadInternalArrayFunction()
61 __ LoadNativeContextSlot(Context::ARRAY_FUNCTION_INDEX, result); in GenerateLoadArrayFunction()
77 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_InternalArrayCode()
78 __ TestIfSmi(r5, r0); in Generate_InternalArrayCode()
79 __ Assert(ne, kUnexpectedInitialMapForInternalArrayFunction, cr0); in Generate_InternalArrayCode()
80 __ CompareObjectType(r5, r6, r7, MAP_TYPE); in Generate_InternalArrayCode()
81 __ Assert(eq, kUnexpectedInitialMapForInternalArrayFunction); in Generate_InternalArrayCode()
88 __ TailCallStub(&stub); in Generate_InternalArrayCode()
104 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kPrototypeOrInitialMapOffset)); in Generate_ArrayCode()
105 __ TestIfSmi(r5, r0); in Generate_ArrayCode()
106 __ Assert(ne, kUnexpectedInitialMapForArrayFunction, cr0); in Generate_ArrayCode()
107 __ CompareObjectType(r5, r6, r7, MAP_TYPE); in Generate_ArrayCode()
108 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); in Generate_ArrayCode()
111 __ mr(r6, r4); in Generate_ArrayCode()
114 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); in Generate_ArrayCode()
116 __ TailCallStub(&stub); in Generate_ArrayCode()
137 __ LoadRoot(r8, root_index); in Generate_MathMaxMin()
138 __ lfd(d1, FieldMemOperand(r8, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
143 __ addi(r7, r3, Operand(1)); in Generate_MathMaxMin()
146 __ mr(r7, r3); in Generate_MathMaxMin()
147 __ bind(&loop); in Generate_MathMaxMin()
150 __ subi(r7, r7, Operand(1)); in Generate_MathMaxMin()
151 __ cmpi(r7, Operand::Zero()); in Generate_MathMaxMin()
152 __ blt(&done_loop); in Generate_MathMaxMin()
155 __ ShiftLeftImm(r5, r7, Operand(kPointerSizeLog2)); in Generate_MathMaxMin()
156 __ LoadPX(r5, MemOperand(sp, r5)); in Generate_MathMaxMin()
161 __ bind(&convert); in Generate_MathMaxMin()
162 __ JumpIfSmi(r5, &convert_smi); in Generate_MathMaxMin()
163 __ LoadP(r6, FieldMemOperand(r5, HeapObject::kMapOffset)); in Generate_MathMaxMin()
164 __ JumpIfRoot(r6, Heap::kHeapNumberMapRootIndex, &convert_number); in Generate_MathMaxMin()
168 __ SmiTag(r3); in Generate_MathMaxMin()
169 __ SmiTag(r7); in Generate_MathMaxMin()
170 __ EnterBuiltinFrame(cp, r4, r3); in Generate_MathMaxMin()
171 __ Push(r7, r8); in Generate_MathMaxMin()
172 __ mr(r3, r5); in Generate_MathMaxMin()
173 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_MathMaxMin()
174 __ mr(r5, r3); in Generate_MathMaxMin()
175 __ Pop(r7, r8); in Generate_MathMaxMin()
176 __ LeaveBuiltinFrame(cp, r4, r3); in Generate_MathMaxMin()
177 __ SmiUntag(r7); in Generate_MathMaxMin()
178 __ SmiUntag(r3); in Generate_MathMaxMin()
182 __ SmiToDouble(d1, r8); in Generate_MathMaxMin()
183 __ JumpIfSmi(r8, &done_restore); in Generate_MathMaxMin()
184 __ lfd(d1, FieldMemOperand(r8, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
185 __ bind(&done_restore); in Generate_MathMaxMin()
188 __ b(&convert); in Generate_MathMaxMin()
189 __ bind(&convert_number); in Generate_MathMaxMin()
190 __ lfd(d2, FieldMemOperand(r5, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
191 __ b(&done_convert); in Generate_MathMaxMin()
192 __ bind(&convert_smi); in Generate_MathMaxMin()
193 __ SmiToDouble(d2, r5); in Generate_MathMaxMin()
194 __ bind(&done_convert); in Generate_MathMaxMin()
199 __ fcmpu(d1, d2); in Generate_MathMaxMin()
200 __ bunordered(&compare_nan); in Generate_MathMaxMin()
201 __ b(cond_done, &loop); in Generate_MathMaxMin()
202 __ b(CommuteCondition(cond_done), &compare_swap); in Generate_MathMaxMin()
205 __ TestDoubleIsMinusZero(reg, r9, r0); in Generate_MathMaxMin()
206 __ bne(&loop); in Generate_MathMaxMin()
209 __ bind(&compare_swap); in Generate_MathMaxMin()
210 __ fmr(d1, d2); in Generate_MathMaxMin()
211 __ mr(r8, r5); in Generate_MathMaxMin()
212 __ b(&loop); in Generate_MathMaxMin()
216 __ bind(&compare_nan); in Generate_MathMaxMin()
217 __ LoadRoot(r8, Heap::kNanValueRootIndex); in Generate_MathMaxMin()
218 __ lfd(d1, FieldMemOperand(r8, HeapNumber::kValueOffset)); in Generate_MathMaxMin()
219 __ b(&loop); in Generate_MathMaxMin()
222 __ bind(&done_loop); in Generate_MathMaxMin()
224 __ addi(r3, r3, Operand(1)); in Generate_MathMaxMin()
225 __ Drop(r3); in Generate_MathMaxMin()
226 __ mr(r3, r8); in Generate_MathMaxMin()
227 __ Ret(); in Generate_MathMaxMin()
244 __ mr(r5, r3); // Store argc in r5. in Generate_NumberConstructor()
245 __ cmpi(r3, Operand::Zero()); in Generate_NumberConstructor()
246 __ beq(&no_arguments); in Generate_NumberConstructor()
247 __ subi(r3, r3, Operand(1)); in Generate_NumberConstructor()
248 __ ShiftLeftImm(r3, r3, Operand(kPointerSizeLog2)); in Generate_NumberConstructor()
249 __ LoadPX(r3, MemOperand(sp, r3)); in Generate_NumberConstructor()
255 __ SmiTag(r5); in Generate_NumberConstructor()
256 __ EnterBuiltinFrame(cp, r4, r5); in Generate_NumberConstructor()
257 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor()
258 __ LeaveBuiltinFrame(cp, r4, r5); in Generate_NumberConstructor()
259 __ SmiUntag(r5); in Generate_NumberConstructor()
264 __ Drop(r5); in Generate_NumberConstructor()
265 __ Ret(1); in Generate_NumberConstructor()
269 __ bind(&no_arguments); in Generate_NumberConstructor()
270 __ LoadSmiLiteral(r3, Smi::kZero); in Generate_NumberConstructor()
271 __ Ret(1); in Generate_NumberConstructor()
287 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); in Generate_NumberConstructor_ConstructStub()
292 __ mr(r9, r3); // Store argc in r9. in Generate_NumberConstructor_ConstructStub()
293 __ cmpi(r3, Operand::Zero()); in Generate_NumberConstructor_ConstructStub()
294 __ beq(&no_arguments); in Generate_NumberConstructor_ConstructStub()
295 __ subi(r3, r3, Operand(1)); in Generate_NumberConstructor_ConstructStub()
296 __ ShiftLeftImm(r5, r3, Operand(kPointerSizeLog2)); in Generate_NumberConstructor_ConstructStub()
297 __ LoadPX(r5, MemOperand(sp, r5)); in Generate_NumberConstructor_ConstructStub()
298 __ b(&done); in Generate_NumberConstructor_ConstructStub()
299 __ bind(&no_arguments); in Generate_NumberConstructor_ConstructStub()
300 __ LoadSmiLiteral(r5, Smi::kZero); in Generate_NumberConstructor_ConstructStub()
301 __ bind(&done); in Generate_NumberConstructor_ConstructStub()
307 __ JumpIfSmi(r5, &done_convert); in Generate_NumberConstructor_ConstructStub()
308 __ CompareObjectType(r5, r7, r7, HEAP_NUMBER_TYPE); in Generate_NumberConstructor_ConstructStub()
309 __ beq(&done_convert); in Generate_NumberConstructor_ConstructStub()
312 __ SmiTag(r9); in Generate_NumberConstructor_ConstructStub()
313 __ EnterBuiltinFrame(cp, r4, r9); in Generate_NumberConstructor_ConstructStub()
314 __ Push(r6); in Generate_NumberConstructor_ConstructStub()
315 __ mr(r3, r5); in Generate_NumberConstructor_ConstructStub()
316 __ Call(masm->isolate()->builtins()->ToNumber(), RelocInfo::CODE_TARGET); in Generate_NumberConstructor_ConstructStub()
317 __ mr(r5, r3); in Generate_NumberConstructor_ConstructStub()
318 __ Pop(r6); in Generate_NumberConstructor_ConstructStub()
319 __ LeaveBuiltinFrame(cp, r4, r9); in Generate_NumberConstructor_ConstructStub()
320 __ SmiUntag(r9); in Generate_NumberConstructor_ConstructStub()
322 __ bind(&done_convert); in Generate_NumberConstructor_ConstructStub()
327 __ cmp(r4, r6); in Generate_NumberConstructor_ConstructStub()
328 __ bne(&new_object); in Generate_NumberConstructor_ConstructStub()
331 __ AllocateJSValue(r3, r4, r5, r7, r8, &new_object); in Generate_NumberConstructor_ConstructStub()
332 __ b(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
335 __ bind(&new_object); in Generate_NumberConstructor_ConstructStub()
338 __ SmiTag(r9); in Generate_NumberConstructor_ConstructStub()
339 __ EnterBuiltinFrame(cp, r4, r9); in Generate_NumberConstructor_ConstructStub()
340 __ Push(r5); // first argument in Generate_NumberConstructor_ConstructStub()
342 __ CallStub(&stub); in Generate_NumberConstructor_ConstructStub()
343 __ Pop(r5); in Generate_NumberConstructor_ConstructStub()
344 __ LeaveBuiltinFrame(cp, r4, r9); in Generate_NumberConstructor_ConstructStub()
345 __ SmiUntag(r9); in Generate_NumberConstructor_ConstructStub()
347 __ StoreP(r5, FieldMemOperand(r3, JSValue::kValueOffset), r0); in Generate_NumberConstructor_ConstructStub()
349 __ bind(&drop_frame_and_ret); in Generate_NumberConstructor_ConstructStub()
351 __ Drop(r9); in Generate_NumberConstructor_ConstructStub()
352 __ Ret(1); in Generate_NumberConstructor_ConstructStub()
370 __ mr(r5, r3); // Store argc in r5. in Generate_StringConstructor()
371 __ cmpi(r3, Operand::Zero()); in Generate_StringConstructor()
372 __ beq(&no_arguments); in Generate_StringConstructor()
373 __ subi(r3, r3, Operand(1)); in Generate_StringConstructor()
374 __ ShiftLeftImm(r3, r3, Operand(kPointerSizeLog2)); in Generate_StringConstructor()
375 __ LoadPX(r3, MemOperand(sp, r3)); in Generate_StringConstructor()
382 __ JumpIfSmi(r3, &to_string); in Generate_StringConstructor()
384 __ CompareObjectType(r3, r6, r6, FIRST_NONSTRING_TYPE); in Generate_StringConstructor()
385 __ bgt(&to_string); in Generate_StringConstructor()
386 __ beq(&symbol_descriptive_string); in Generate_StringConstructor()
387 __ b(&drop_frame_and_ret); in Generate_StringConstructor()
391 __ bind(&no_arguments); in Generate_StringConstructor()
393 __ LoadRoot(r3, Heap::kempty_stringRootIndex); in Generate_StringConstructor()
394 __ Ret(1); in Generate_StringConstructor()
398 __ bind(&to_string); in Generate_StringConstructor()
401 __ SmiTag(r5); in Generate_StringConstructor()
402 __ EnterBuiltinFrame(cp, r4, r5); in Generate_StringConstructor()
403 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor()
404 __ LeaveBuiltinFrame(cp, r4, r5); in Generate_StringConstructor()
405 __ SmiUntag(r5); in Generate_StringConstructor()
407 __ b(&drop_frame_and_ret); in Generate_StringConstructor()
410 __ bind(&symbol_descriptive_string); in Generate_StringConstructor()
412 __ Drop(r5); in Generate_StringConstructor()
413 __ Drop(1); in Generate_StringConstructor()
414 __ Push(r3); in Generate_StringConstructor()
415 __ TailCallRuntime(Runtime::kSymbolDescriptiveString); in Generate_StringConstructor()
418 __ bind(&drop_frame_and_ret); in Generate_StringConstructor()
420 __ Drop(r5); in Generate_StringConstructor()
421 __ Ret(1); in Generate_StringConstructor()
438 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); in Generate_StringConstructor_ConstructStub()
443 __ mr(r9, r3); // Store argc in r9. in Generate_StringConstructor_ConstructStub()
444 __ cmpi(r3, Operand::Zero()); in Generate_StringConstructor_ConstructStub()
445 __ beq(&no_arguments); in Generate_StringConstructor_ConstructStub()
446 __ subi(r3, r3, Operand(1)); in Generate_StringConstructor_ConstructStub()
447 __ ShiftLeftImm(r5, r3, Operand(kPointerSizeLog2)); in Generate_StringConstructor_ConstructStub()
448 __ LoadPX(r5, MemOperand(sp, r5)); in Generate_StringConstructor_ConstructStub()
449 __ b(&done); in Generate_StringConstructor_ConstructStub()
450 __ bind(&no_arguments); in Generate_StringConstructor_ConstructStub()
451 __ LoadRoot(r5, Heap::kempty_stringRootIndex); in Generate_StringConstructor_ConstructStub()
452 __ bind(&done); in Generate_StringConstructor_ConstructStub()
458 __ JumpIfSmi(r5, &convert); in Generate_StringConstructor_ConstructStub()
459 __ CompareObjectType(r5, r7, r7, FIRST_NONSTRING_TYPE); in Generate_StringConstructor_ConstructStub()
460 __ blt(&done_convert); in Generate_StringConstructor_ConstructStub()
461 __ bind(&convert); in Generate_StringConstructor_ConstructStub()
464 __ SmiTag(r9); in Generate_StringConstructor_ConstructStub()
465 __ EnterBuiltinFrame(cp, r4, r9); in Generate_StringConstructor_ConstructStub()
466 __ Push(r6); in Generate_StringConstructor_ConstructStub()
467 __ mr(r3, r5); in Generate_StringConstructor_ConstructStub()
468 __ Call(masm->isolate()->builtins()->ToString(), RelocInfo::CODE_TARGET); in Generate_StringConstructor_ConstructStub()
469 __ mr(r5, r3); in Generate_StringConstructor_ConstructStub()
470 __ Pop(r6); in Generate_StringConstructor_ConstructStub()
471 __ LeaveBuiltinFrame(cp, r4, r9); in Generate_StringConstructor_ConstructStub()
472 __ SmiUntag(r9); in Generate_StringConstructor_ConstructStub()
474 __ bind(&done_convert); in Generate_StringConstructor_ConstructStub()
479 __ cmp(r4, r6); in Generate_StringConstructor_ConstructStub()
480 __ bne(&new_object); in Generate_StringConstructor_ConstructStub()
483 __ AllocateJSValue(r3, r4, r5, r7, r8, &new_object); in Generate_StringConstructor_ConstructStub()
484 __ b(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
487 __ bind(&new_object); in Generate_StringConstructor_ConstructStub()
490 __ SmiTag(r9); in Generate_StringConstructor_ConstructStub()
491 __ EnterBuiltinFrame(cp, r4, r9); in Generate_StringConstructor_ConstructStub()
492 __ Push(r5); // first argument in Generate_StringConstructor_ConstructStub()
494 __ CallStub(&stub); in Generate_StringConstructor_ConstructStub()
495 __ Pop(r5); in Generate_StringConstructor_ConstructStub()
496 __ LeaveBuiltinFrame(cp, r4, r9); in Generate_StringConstructor_ConstructStub()
497 __ SmiUntag(r9); in Generate_StringConstructor_ConstructStub()
499 __ StoreP(r5, FieldMemOperand(r3, JSValue::kValueOffset), r0); in Generate_StringConstructor_ConstructStub()
501 __ bind(&drop_frame_and_ret); in Generate_StringConstructor_ConstructStub()
503 __ Drop(r9); in Generate_StringConstructor_ConstructStub()
504 __ Ret(1); in Generate_StringConstructor_ConstructStub()
509 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in GenerateTailCallToSharedCode()
510 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); in GenerateTailCallToSharedCode()
511 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); in GenerateTailCallToSharedCode()
512 __ JumpToJSEntry(ip); in GenerateTailCallToSharedCode()
527 __ SmiTag(r3); in GenerateTailCallToReturnedCode()
528 __ Push(r3, r4, r6, r4); in GenerateTailCallToReturnedCode()
530 __ CallRuntime(function_id, 1); in GenerateTailCallToReturnedCode()
531 __ mr(r5, r3); in GenerateTailCallToReturnedCode()
534 __ Pop(r3, r4, r6); in GenerateTailCallToReturnedCode()
535 __ SmiUntag(r3); in GenerateTailCallToReturnedCode()
537 __ addi(ip, r5, Operand(Code::kHeaderSize - kHeapObjectTag)); in GenerateTailCallToReturnedCode()
538 __ JumpToJSEntry(ip); in GenerateTailCallToReturnedCode()
548 __ LoadRoot(ip, Heap::kStackLimitRootIndex); in Generate_InOptimizationQueue()
549 __ cmpl(sp, ip); in Generate_InOptimizationQueue()
550 __ bge(&ok); in Generate_InOptimizationQueue()
554 __ bind(&ok); in Generate_InOptimizationQueue()
581 __ SmiTag(r7, r3, SetRC); in Generate_JSConstructStubHelper()
582 __ Push(cp, r7); in Generate_JSConstructStubHelper()
583 __ PushRoot(Heap::kTheHoleValueRootIndex); in Generate_JSConstructStubHelper()
585 __ SmiTag(r3); in Generate_JSConstructStubHelper()
586 __ Push(cp, r3); in Generate_JSConstructStubHelper()
589 __ Push(r4, r6); in Generate_JSConstructStubHelper()
591 __ CallStub(&stub); in Generate_JSConstructStubHelper()
592 __ mr(r7, r3); in Generate_JSConstructStubHelper()
593 __ Pop(r4, r6); in Generate_JSConstructStubHelper()
602 __ LoadP(r3, MemOperand(sp)); in Generate_JSConstructStubHelper()
603 __ SmiUntag(r3, SetRC); in Generate_JSConstructStubHelper()
608 __ Push(r7, r7); in Generate_JSConstructStubHelper()
612 __ addi(r5, fp, Operand(StandardFrameConstants::kCallerSPOffset)); in Generate_JSConstructStubHelper()
624 __ beq(&no_args, cr0); in Generate_JSConstructStubHelper()
625 __ ShiftLeftImm(ip, r3, Operand(kPointerSizeLog2)); in Generate_JSConstructStubHelper()
626 __ sub(sp, sp, ip); in Generate_JSConstructStubHelper()
627 __ mtctr(r3); in Generate_JSConstructStubHelper()
628 __ bind(&loop); in Generate_JSConstructStubHelper()
629 __ subi(ip, ip, Operand(kPointerSize)); in Generate_JSConstructStubHelper()
630 __ LoadPX(r0, MemOperand(r5, ip)); in Generate_JSConstructStubHelper()
631 __ StorePX(r0, MemOperand(sp, ip)); in Generate_JSConstructStubHelper()
632 __ bdnz(&loop); in Generate_JSConstructStubHelper()
633 __ bind(&no_args); in Generate_JSConstructStubHelper()
641 __ InvokeFunction(r4, r6, actual, CALL_FUNCTION, in Generate_JSConstructStubHelper()
653 __ LoadP(cp, MemOperand(fp, ConstructFrameConstants::kContextOffset)); in Generate_JSConstructStubHelper()
665 __ JumpIfSmi(r3, &use_receiver); in Generate_JSConstructStubHelper()
669 __ CompareObjectType(r3, r4, r6, FIRST_JS_RECEIVER_TYPE); in Generate_JSConstructStubHelper()
670 __ bge(&exit); in Generate_JSConstructStubHelper()
674 __ bind(&use_receiver); in Generate_JSConstructStubHelper()
675 __ LoadP(r3, MemOperand(sp)); in Generate_JSConstructStubHelper()
679 __ bind(&exit); in Generate_JSConstructStubHelper()
683 __ LoadP(r4, MemOperand(sp, 1 * kPointerSize)); in Generate_JSConstructStubHelper()
685 __ LoadP(r4, MemOperand(sp)); in Generate_JSConstructStubHelper()
696 __ JumpIfNotSmi(r3, &dont_throw); in Generate_JSConstructStubHelper()
699 __ CallRuntime(Runtime::kThrowDerivedConstructorReturnedNonObject); in Generate_JSConstructStubHelper()
701 __ bind(&dont_throw); in Generate_JSConstructStubHelper()
704 __ SmiToPtrArrayOffset(r4, r4); in Generate_JSConstructStubHelper()
705 __ add(sp, sp, r4); in Generate_JSConstructStubHelper()
706 __ addi(sp, sp, Operand(kPointerSize)); in Generate_JSConstructStubHelper()
708 __ IncrementCounter(isolate->counters()->constructed_objects(), 1, r4, r5); in Generate_JSConstructStubHelper()
710 __ blr(); in Generate_JSConstructStubHelper()
740 __ AssertGeneratorObject(r4); in Generate_ResumeGeneratorTrampoline()
743 __ StoreP(r3, FieldMemOperand(r4, JSGeneratorObject::kInputOrDebugPosOffset), in Generate_ResumeGeneratorTrampoline()
745 __ RecordWriteField(r4, JSGeneratorObject::kInputOrDebugPosOffset, r3, r6, in Generate_ResumeGeneratorTrampoline()
749 __ StoreP(r5, FieldMemOperand(r4, JSGeneratorObject::kResumeModeOffset), r0); in Generate_ResumeGeneratorTrampoline()
752 __ LoadP(cp, FieldMemOperand(r4, JSGeneratorObject::kContextOffset)); in Generate_ResumeGeneratorTrampoline()
753 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
761 __ mov(ip, Operand(last_step_action)); in Generate_ResumeGeneratorTrampoline()
762 __ LoadByte(ip, MemOperand(ip), r0); in Generate_ResumeGeneratorTrampoline()
763 __ extsb(ip, ip); in Generate_ResumeGeneratorTrampoline()
764 __ cmpi(ip, Operand(StepIn)); in Generate_ResumeGeneratorTrampoline()
765 __ bge(&prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
772 __ mov(ip, Operand(debug_suspended_generator)); in Generate_ResumeGeneratorTrampoline()
773 __ LoadP(ip, MemOperand(ip)); in Generate_ResumeGeneratorTrampoline()
774 __ cmp(ip, r4); in Generate_ResumeGeneratorTrampoline()
775 __ beq(&prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
776 __ bind(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
779 __ LoadP(ip, FieldMemOperand(r4, JSGeneratorObject::kReceiverOffset)); in Generate_ResumeGeneratorTrampoline()
780 __ Push(ip); in Generate_ResumeGeneratorTrampoline()
795 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
796 __ LoadWordArith( in Generate_ResumeGeneratorTrampoline()
800 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); in Generate_ResumeGeneratorTrampoline()
802 __ cmpi(r3, Operand::Zero()); in Generate_ResumeGeneratorTrampoline()
803 __ beq(&done_loop); in Generate_ResumeGeneratorTrampoline()
805 __ SmiUntag(r3, SetRC); in Generate_ResumeGeneratorTrampoline()
806 __ beq(&done_loop, cr0); in Generate_ResumeGeneratorTrampoline()
808 __ mtctr(r3); in Generate_ResumeGeneratorTrampoline()
809 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
810 __ push(ip); in Generate_ResumeGeneratorTrampoline()
811 __ bdnz(&loop); in Generate_ResumeGeneratorTrampoline()
812 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
817 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kFunctionDataOffset)); in Generate_ResumeGeneratorTrampoline()
818 __ CompareObjectType(r6, r6, r6, BYTECODE_ARRAY_TYPE); in Generate_ResumeGeneratorTrampoline()
819 __ bne(&old_generator); in Generate_ResumeGeneratorTrampoline()
826 __ mr(r6, r4); in Generate_ResumeGeneratorTrampoline()
827 __ mr(r4, r7); in Generate_ResumeGeneratorTrampoline()
828 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kCodeEntryOffset)); in Generate_ResumeGeneratorTrampoline()
829 __ JumpToJSEntry(ip); in Generate_ResumeGeneratorTrampoline()
833 __ bind(&old_generator); in Generate_ResumeGeneratorTrampoline()
838 __ PushStandardFrame(r7); in Generate_ResumeGeneratorTrampoline()
841 __ LoadP(r3, FieldMemOperand(r4, JSGeneratorObject::kOperandStackOffset)); in Generate_ResumeGeneratorTrampoline()
842 __ LoadP(r6, FieldMemOperand(r3, FixedArray::kLengthOffset)); in Generate_ResumeGeneratorTrampoline()
843 __ addi(r3, r3, in Generate_ResumeGeneratorTrampoline()
847 __ SmiUntag(r6, SetRC); in Generate_ResumeGeneratorTrampoline()
848 __ beq(&done_loop, cr0); in Generate_ResumeGeneratorTrampoline()
849 __ mtctr(r6); in Generate_ResumeGeneratorTrampoline()
850 __ bind(&loop); in Generate_ResumeGeneratorTrampoline()
851 __ LoadPU(ip, MemOperand(r3, kPointerSize)); in Generate_ResumeGeneratorTrampoline()
852 __ Push(ip); in Generate_ResumeGeneratorTrampoline()
853 __ bdnz(&loop); in Generate_ResumeGeneratorTrampoline()
854 __ bind(&done_loop); in Generate_ResumeGeneratorTrampoline()
858 __ LoadRoot(ip, Heap::kEmptyFixedArrayRootIndex); in Generate_ResumeGeneratorTrampoline()
859 __ StoreP(ip, FieldMemOperand(r4, JSGeneratorObject::kOperandStackOffset), in Generate_ResumeGeneratorTrampoline()
863 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); in Generate_ResumeGeneratorTrampoline()
864 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kCodeOffset)); in Generate_ResumeGeneratorTrampoline()
865 __ addi(r6, r6, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_ResumeGeneratorTrampoline()
869 __ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r6); in Generate_ResumeGeneratorTrampoline()
871 __ LoadP(r5, FieldMemOperand(r4, JSGeneratorObject::kContinuationOffset)); in Generate_ResumeGeneratorTrampoline()
872 __ SmiUntag(r5); in Generate_ResumeGeneratorTrampoline()
873 __ add(r6, r6, r5); in Generate_ResumeGeneratorTrampoline()
874 __ LoadSmiLiteral(r5, in Generate_ResumeGeneratorTrampoline()
876 __ StoreP(r5, FieldMemOperand(r4, JSGeneratorObject::kContinuationOffset), in Generate_ResumeGeneratorTrampoline()
878 __ mr(r3, r4); // Continuation expects generator object in r3. in Generate_ResumeGeneratorTrampoline()
879 __ Jump(r6); in Generate_ResumeGeneratorTrampoline()
883 __ bind(&prepare_step_in_if_stepping); in Generate_ResumeGeneratorTrampoline()
886 __ Push(r4, r5, r7); in Generate_ResumeGeneratorTrampoline()
887 __ CallRuntime(Runtime::kDebugPrepareStepInIfStepping); in Generate_ResumeGeneratorTrampoline()
888 __ Pop(r4, r5); in Generate_ResumeGeneratorTrampoline()
889 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
891 __ b(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
893 __ bind(&prepare_step_in_suspended_generator); in Generate_ResumeGeneratorTrampoline()
896 __ Push(r4, r5); in Generate_ResumeGeneratorTrampoline()
897 __ CallRuntime(Runtime::kDebugPrepareStepInSuspendedGenerator); in Generate_ResumeGeneratorTrampoline()
898 __ Pop(r4, r5); in Generate_ResumeGeneratorTrampoline()
899 __ LoadP(r7, FieldMemOperand(r4, JSGeneratorObject::kFunctionOffset)); in Generate_ResumeGeneratorTrampoline()
901 __ b(&stepping_prepared); in Generate_ResumeGeneratorTrampoline()
906 __ push(r4); in Generate_ConstructedNonConstructable()
907 __ CallRuntime(Runtime::kThrowConstructedNonConstructable); in Generate_ConstructedNonConstructable()
919 __ LoadRoot(r5, Heap::kRealStackLimitRootIndex); in Generate_CheckStackOverflow()
922 __ sub(r5, sp, r5); in Generate_CheckStackOverflow()
925 __ SmiToPtrArrayOffset(r0, argc); in Generate_CheckStackOverflow()
928 __ ShiftLeftImm(r0, argc, Operand(kPointerSizeLog2)); in Generate_CheckStackOverflow()
930 __ cmp(r5, r0); in Generate_CheckStackOverflow()
931 __ bgt(&okay); // Signed comparison. in Generate_CheckStackOverflow()
934 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_CheckStackOverflow()
936 __ bind(&okay); in Generate_CheckStackOverflow()
957 __ mov(cp, Operand(context_address)); in Generate_JSEntryTrampolineHelper()
958 __ LoadP(cp, MemOperand(cp)); in Generate_JSEntryTrampolineHelper()
960 __ InitializeRootRegister(); in Generate_JSEntryTrampolineHelper()
963 __ Push(r4, r5); in Generate_JSEntryTrampolineHelper()
974 __ ShiftLeftImm(r0, r6, Operand(kPointerSizeLog2)); in Generate_JSEntryTrampolineHelper()
975 __ add(r5, r7, r0); in Generate_JSEntryTrampolineHelper()
977 __ b(&entry); in Generate_JSEntryTrampolineHelper()
978 __ bind(&loop); in Generate_JSEntryTrampolineHelper()
979 __ LoadP(r8, MemOperand(r7)); // read next parameter in Generate_JSEntryTrampolineHelper()
980 __ addi(r7, r7, Operand(kPointerSize)); in Generate_JSEntryTrampolineHelper()
981 __ LoadP(r0, MemOperand(r8)); // dereference handle in Generate_JSEntryTrampolineHelper()
982 __ push(r0); // push parameter in Generate_JSEntryTrampolineHelper()
983 __ bind(&entry); in Generate_JSEntryTrampolineHelper()
984 __ cmp(r7, r5); in Generate_JSEntryTrampolineHelper()
985 __ bne(&loop); in Generate_JSEntryTrampolineHelper()
988 __ mr(r7, r3); in Generate_JSEntryTrampolineHelper()
989 __ mr(r3, r6); in Generate_JSEntryTrampolineHelper()
990 __ mr(r6, r7); in Generate_JSEntryTrampolineHelper()
994 __ LoadRoot(r7, Heap::kUndefinedValueRootIndex); in Generate_JSEntryTrampolineHelper()
995 __ mr(r14, r7); in Generate_JSEntryTrampolineHelper()
996 __ mr(r15, r7); in Generate_JSEntryTrampolineHelper()
997 __ mr(r16, r7); in Generate_JSEntryTrampolineHelper()
998 __ mr(r17, r7); in Generate_JSEntryTrampolineHelper()
1004 __ Call(builtin, RelocInfo::CODE_TARGET); in Generate_JSEntryTrampolineHelper()
1009 __ blr(); in Generate_JSEntryTrampolineHelper()
1026 __ LoadP(args_count, in LeaveInterpreterFrame()
1028 __ lwz(args_count, in LeaveInterpreterFrame()
1032 __ LeaveFrame(StackFrame::JAVA_SCRIPT); in LeaveInterpreterFrame()
1034 __ add(sp, sp, args_count); in LeaveInterpreterFrame()
1060 __ PushStandardFrame(r4); in Generate_InterpreterEntryTrampoline()
1064 __ LoadP(r3, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
1068 __ LoadP(debug_info, in Generate_InterpreterEntryTrampoline()
1071 __ LoadP(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1073 __ CmpSmiLiteral(debug_info, DebugInfo::uninitialized(), r0); in Generate_InterpreterEntryTrampoline()
1074 __ beq(&array_done); in Generate_InterpreterEntryTrampoline()
1075 __ LoadP(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1077 __ bind(&array_done); in Generate_InterpreterEntryTrampoline()
1081 __ LoadP(r3, FieldMemOperand(r3, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
1082 __ mov(ip, Operand(masm->CodeObject())); // Self-reference to this code. in Generate_InterpreterEntryTrampoline()
1083 __ cmp(r3, ip); in Generate_InterpreterEntryTrampoline()
1084 __ bne(&switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
1087 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kLiteralsOffset)); in Generate_InterpreterEntryTrampoline()
1088 __ LoadP(r7, FieldMemOperand(r7, LiteralsArray::kFeedbackVectorOffset)); in Generate_InterpreterEntryTrampoline()
1089 __ LoadP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * in Generate_InterpreterEntryTrampoline()
1092 __ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0); in Generate_InterpreterEntryTrampoline()
1093 __ StoreP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex * in Generate_InterpreterEntryTrampoline()
1101 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); in Generate_InterpreterEntryTrampoline()
1102 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEntryTrampoline()
1103 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r3, no_reg, in Generate_InterpreterEntryTrampoline()
1105 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEntryTrampoline()
1109 __ mov(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEntryTrampoline()
1113 __ SmiTag(r3, kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEntryTrampoline()
1114 __ Push(r6, kInterpreterBytecodeArrayRegister, r3); in Generate_InterpreterEntryTrampoline()
1119 __ lwz(r5, FieldMemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1124 __ sub(r6, sp, r5); in Generate_InterpreterEntryTrampoline()
1125 __ LoadRoot(r0, Heap::kRealStackLimitRootIndex); in Generate_InterpreterEntryTrampoline()
1126 __ cmpl(r6, r0); in Generate_InterpreterEntryTrampoline()
1127 __ bge(&ok); in Generate_InterpreterEntryTrampoline()
1128 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterEntryTrampoline()
1129 __ bind(&ok); in Generate_InterpreterEntryTrampoline()
1134 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
1135 __ ShiftRightImm(r5, r5, Operand(kPointerSizeLog2), SetRC); in Generate_InterpreterEntryTrampoline()
1136 __ beq(&no_args, cr0); in Generate_InterpreterEntryTrampoline()
1137 __ mtctr(r5); in Generate_InterpreterEntryTrampoline()
1138 __ bind(&loop); in Generate_InterpreterEntryTrampoline()
1139 __ push(r6); in Generate_InterpreterEntryTrampoline()
1140 __ bdnz(&loop); in Generate_InterpreterEntryTrampoline()
1141 __ bind(&no_args); in Generate_InterpreterEntryTrampoline()
1145 __ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); in Generate_InterpreterEntryTrampoline()
1146 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEntryTrampoline()
1151 __ lbzx(r4, MemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEntryTrampoline()
1153 __ ShiftLeftImm(ip, r4, Operand(kPointerSizeLog2)); in Generate_InterpreterEntryTrampoline()
1154 __ LoadPX(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); in Generate_InterpreterEntryTrampoline()
1155 __ Call(ip); in Generate_InterpreterEntryTrampoline()
1161 __ blr(); in Generate_InterpreterEntryTrampoline()
1166 __ bind(&switch_to_different_code_kind); in Generate_InterpreterEntryTrampoline()
1167 __ LeaveFrame(StackFrame::JAVA_SCRIPT); in Generate_InterpreterEntryTrampoline()
1168 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterEntryTrampoline()
1169 __ LoadP(r7, FieldMemOperand(r7, SharedFunctionInfo::kCodeOffset)); in Generate_InterpreterEntryTrampoline()
1170 __ addi(r7, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_InterpreterEntryTrampoline()
1171 __ StoreP(r7, FieldMemOperand(r4, JSFunction::kCodeEntryOffset), r0); in Generate_InterpreterEntryTrampoline()
1172 __ RecordWriteCodeEntryField(r4, r7, r8); in Generate_InterpreterEntryTrampoline()
1173 __ JumpToJSEntry(r7); in Generate_InterpreterEntryTrampoline()
1182 __ LoadRoot(scratch, Heap::kRealStackLimitRootIndex); in Generate_StackOverflowCheck()
1185 __ sub(scratch, sp, scratch); in Generate_StackOverflowCheck()
1187 __ ShiftLeftImm(r0, num_args, Operand(kPointerSizeLog2)); in Generate_StackOverflowCheck()
1188 __ cmp(scratch, r0); in Generate_StackOverflowCheck()
1189 __ ble(stack_overflow); // Signed comparison. in Generate_StackOverflowCheck()
1200 __ addi(index, index, Operand(kPointerSize)); // Bias up for LoadPU in Generate_InterpreterPushArgs()
1201 __ mtctr(count); in Generate_InterpreterPushArgs()
1202 __ bind(&loop); in Generate_InterpreterPushArgs()
1203 __ LoadPU(scratch, MemOperand(index, -kPointerSize)); in Generate_InterpreterPushArgs()
1204 __ push(scratch); in Generate_InterpreterPushArgs()
1205 __ bdnz(&loop); in Generate_InterpreterPushArgs()
1222 __ addi(r6, r3, Operand(1)); in Generate_InterpreterPushArgsAndCallImpl()
1229 __ Jump(masm->isolate()->builtins()->CallFunction(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
1234 __ Jump(masm->isolate()->builtins()->Call(ConvertReceiverMode::kAny, in Generate_InterpreterPushArgsAndCallImpl()
1239 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndCallImpl()
1241 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndCallImpl()
1243 __ bkpt(0); in Generate_InterpreterPushArgsAndCallImpl()
1260 __ li(r0, Operand::Zero()); in Generate_InterpreterPushArgsAndConstructImpl()
1261 __ push(r0); in Generate_InterpreterPushArgsAndConstructImpl()
1265 __ cmpi(r3, Operand::Zero()); in Generate_InterpreterPushArgsAndConstructImpl()
1266 __ beq(&skip); in Generate_InterpreterPushArgsAndConstructImpl()
1269 __ bind(&skip); in Generate_InterpreterPushArgsAndConstructImpl()
1271 __ AssertUndefinedOrAllocationSite(r5, r8); in Generate_InterpreterPushArgsAndConstructImpl()
1273 __ AssertFunction(r4); in Generate_InterpreterPushArgsAndConstructImpl()
1277 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
1278 __ LoadP(r7, FieldMemOperand(r7, SharedFunctionInfo::kConstructStubOffset)); in Generate_InterpreterPushArgsAndConstructImpl()
1280 __ addi(ip, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_InterpreterPushArgsAndConstructImpl()
1281 __ Jump(ip); in Generate_InterpreterPushArgsAndConstructImpl()
1286 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_InterpreterPushArgsAndConstructImpl()
1289 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructImpl()
1291 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructImpl()
1293 __ bkpt(0); in Generate_InterpreterPushArgsAndConstructImpl()
1308 __ addi(r7, r3, Operand(1)); // Add one for receiver. in Generate_InterpreterPushArgsAndConstructArray()
1314 __ mr(r6, r4); in Generate_InterpreterPushArgsAndConstructArray()
1317 __ TailCallStub(&stub); in Generate_InterpreterPushArgsAndConstructArray()
1319 __ bind(&stack_overflow); in Generate_InterpreterPushArgsAndConstructArray()
1321 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_InterpreterPushArgsAndConstructArray()
1323 __ bkpt(0); in Generate_InterpreterPushArgsAndConstructArray()
1333 __ Move(r5, masm->isolate()->builtins()->InterpreterEntryTrampoline()); in Generate_InterpreterEnterBytecode()
1334 __ addi(r0, r5, Operand(interpreter_entry_return_pc_offset->value() + in Generate_InterpreterEnterBytecode()
1336 __ mtlr(r0); in Generate_InterpreterEnterBytecode()
1339 __ mov(kInterpreterDispatchTableRegister, in Generate_InterpreterEnterBytecode()
1344 __ LoadP(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1349 __ TestIfSmi(kInterpreterBytecodeArrayRegister, r0); in Generate_InterpreterEnterBytecode()
1350 __ Assert(ne, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEnterBytecode()
1351 __ CompareObjectType(kInterpreterBytecodeArrayRegister, r4, no_reg, in Generate_InterpreterEnterBytecode()
1353 __ Assert(eq, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); in Generate_InterpreterEnterBytecode()
1357 __ LoadP(kInterpreterBytecodeOffsetRegister, in Generate_InterpreterEnterBytecode()
1359 __ SmiUntag(kInterpreterBytecodeOffsetRegister); in Generate_InterpreterEnterBytecode()
1362 __ lbzx(r4, MemOperand(kInterpreterBytecodeArrayRegister, in Generate_InterpreterEnterBytecode()
1364 __ ShiftLeftImm(ip, r4, Operand(kPointerSizeLog2)); in Generate_InterpreterEnterBytecode()
1365 __ LoadPX(ip, MemOperand(kInterpreterDispatchTableRegister, ip)); in Generate_InterpreterEnterBytecode()
1366 __ Jump(ip); in Generate_InterpreterEnterBytecode()
1373 __ LoadP(r4, MemOperand(fp, InterpreterFrameConstants::kBytecodeArrayFromFp)); in Generate_InterpreterEnterBytecodeAdvance()
1374 __ LoadP(r5, in Generate_InterpreterEnterBytecodeAdvance()
1376 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); in Generate_InterpreterEnterBytecodeAdvance()
1379 __ Push(kInterpreterAccumulatorRegister, r4, r5); in Generate_InterpreterEnterBytecodeAdvance()
1380 __ CallRuntime(Runtime::kInterpreterAdvanceBytecodeOffset); in Generate_InterpreterEnterBytecodeAdvance()
1381 __ Move(r5, r3); // Result is the new bytecode offset. in Generate_InterpreterEnterBytecodeAdvance()
1382 __ Pop(kInterpreterAccumulatorRegister); in Generate_InterpreterEnterBytecodeAdvance()
1384 __ StoreP(r5, in Generate_InterpreterEnterBytecodeAdvance()
1408 __ LoadP(map, in Generate_CompileLazy()
1410 __ LoadP(map, in Generate_CompileLazy()
1412 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset)); in Generate_CompileLazy()
1413 __ CmpSmiLiteral(index, Smi::FromInt(2), r0); in Generate_CompileLazy()
1414 __ blt(&gotta_call_runtime); in Generate_CompileLazy()
1423 __ LoadP(native_context, NativeContextMemOperand()); in Generate_CompileLazy()
1425 __ bind(&loop_top); in Generate_CompileLazy()
1430 __ SmiToPtrArrayOffset(array_pointer, index); in Generate_CompileLazy()
1431 __ add(array_pointer, map, array_pointer); in Generate_CompileLazy()
1432 __ LoadP(temp, FieldMemOperand(array_pointer, in Generate_CompileLazy()
1434 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1435 __ cmp(temp, native_context); in Generate_CompileLazy()
1436 __ bne(&loop_bottom); in Generate_CompileLazy()
1438 __ LoadP(temp, in Generate_CompileLazy()
1442 __ CmpSmiLiteral(temp, Smi::FromInt(bailout_id), r0); in Generate_CompileLazy()
1443 __ bne(&loop_bottom); in Generate_CompileLazy()
1445 __ LoadP(temp, in Generate_CompileLazy()
1448 __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset)); in Generate_CompileLazy()
1449 __ JumpIfSmi(temp, &gotta_call_runtime); in Generate_CompileLazy()
1452 __ StoreP(temp, FieldMemOperand(closure, JSFunction::kLiteralsOffset), r0); in Generate_CompileLazy()
1453 __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r7, in Generate_CompileLazy()
1459 __ LoadP(entry, in Generate_CompileLazy()
1462 __ LoadP(entry, FieldMemOperand(entry, WeakCell::kValueOffset)); in Generate_CompileLazy()
1463 __ JumpIfSmi(entry, &try_shared); in Generate_CompileLazy()
1467 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CompileLazy()
1468 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); in Generate_CompileLazy()
1469 __ RecordWriteCodeEntryField(closure, entry, r8); in Generate_CompileLazy()
1475 __ LoadP( in Generate_CompileLazy()
1477 __ StoreP(r8, FieldMemOperand(closure, JSFunction::kNextFunctionLinkOffset), in Generate_CompileLazy()
1479 __ RecordWriteField(closure, JSFunction::kNextFunctionLinkOffset, r8, temp, in Generate_CompileLazy()
1484 __ StoreP( in Generate_CompileLazy()
1488 __ mr(r8, closure); in Generate_CompileLazy()
1489 __ RecordWriteContextSlot(native_context, function_list_offset, r8, temp, in Generate_CompileLazy()
1491 __ JumpToJSEntry(entry); in Generate_CompileLazy()
1493 __ bind(&loop_bottom); in Generate_CompileLazy()
1494 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), in Generate_CompileLazy()
1496 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); in Generate_CompileLazy()
1497 __ bgt(&loop_top); in Generate_CompileLazy()
1500 __ b(&gotta_call_runtime); in Generate_CompileLazy()
1502 __ bind(&try_shared); in Generate_CompileLazy()
1503 __ LoadP(entry, in Generate_CompileLazy()
1506 __ lbz(r8, FieldMemOperand(entry, in Generate_CompileLazy()
1508 __ TestBit(r8, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); in Generate_CompileLazy()
1509 __ bne(&gotta_call_runtime, cr0); in Generate_CompileLazy()
1511 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); in Generate_CompileLazy()
1512 __ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset)); in Generate_CompileLazy()
1513 __ DecodeField<Code::KindField>(r8); in Generate_CompileLazy()
1514 __ cmpi(r8, Operand(Code::BUILTIN)); in Generate_CompileLazy()
1515 __ beq(&gotta_call_runtime); in Generate_CompileLazy()
1517 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CompileLazy()
1518 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); in Generate_CompileLazy()
1519 __ RecordWriteCodeEntryField(closure, entry, r8); in Generate_CompileLazy()
1520 __ JumpToJSEntry(entry); in Generate_CompileLazy()
1522 __ bind(&gotta_call_runtime); in Generate_CompileLazy()
1549 __ Move(r7, r3); in Generate_InstantiateAsmJs()
1552 __ SmiTag(r3); in Generate_InstantiateAsmJs()
1553 __ Push(r3, r4, r6, r4); in Generate_InstantiateAsmJs()
1560 __ cmpi(r7, Operand(j)); in Generate_InstantiateAsmJs()
1561 __ bne(&over); in Generate_InstantiateAsmJs()
1564 __ LoadP(r7, MemOperand(fp, StandardFrameConstants::kCallerSPOffset + in Generate_InstantiateAsmJs()
1566 __ push(r7); in Generate_InstantiateAsmJs()
1569 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_InstantiateAsmJs()
1572 __ jmp(&args_done); in Generate_InstantiateAsmJs()
1573 __ bind(&over); in Generate_InstantiateAsmJs()
1576 __ bind(&args_done); in Generate_InstantiateAsmJs()
1579 __ CallRuntime(Runtime::kInstantiateAsmJs, 4); in Generate_InstantiateAsmJs()
1581 __ JumpIfSmi(r3, &failed); in Generate_InstantiateAsmJs()
1583 __ Drop(2); in Generate_InstantiateAsmJs()
1584 __ pop(r7); in Generate_InstantiateAsmJs()
1585 __ SmiUntag(r7); in Generate_InstantiateAsmJs()
1588 __ addi(r7, r7, Operand(1)); in Generate_InstantiateAsmJs()
1589 __ Drop(r7); in Generate_InstantiateAsmJs()
1590 __ Ret(); in Generate_InstantiateAsmJs()
1592 __ bind(&failed); in Generate_InstantiateAsmJs()
1594 __ Pop(r3, r4, r6); in Generate_InstantiateAsmJs()
1595 __ SmiUntag(r3); in Generate_InstantiateAsmJs()
1609 __ mr(r3, ip); in GenerateMakeCodeYoungAgainCommon()
1618 __ mflr(r0); in GenerateMakeCodeYoungAgainCommon()
1619 __ MultiPush(r0.bit() | r3.bit() | r4.bit() | r6.bit() | fp.bit()); in GenerateMakeCodeYoungAgainCommon()
1620 __ PrepareCallCFunction(2, 0, r5); in GenerateMakeCodeYoungAgainCommon()
1621 __ mov(r4, Operand(ExternalReference::isolate_address(masm->isolate()))); in GenerateMakeCodeYoungAgainCommon()
1622 __ CallCFunction( in GenerateMakeCodeYoungAgainCommon()
1624 __ MultiPop(r0.bit() | r3.bit() | r4.bit() | r6.bit() | fp.bit()); in GenerateMakeCodeYoungAgainCommon()
1625 __ mtlr(r0); in GenerateMakeCodeYoungAgainCommon()
1626 __ mr(ip, r3); in GenerateMakeCodeYoungAgainCommon()
1627 __ Jump(ip); in GenerateMakeCodeYoungAgainCommon()
1650 __ mr(r3, ip); in CODE_AGE_LIST()
1659 __ mflr(r0); in CODE_AGE_LIST()
1660 __ MultiPush(r0.bit() | r3.bit() | r4.bit() | r6.bit() | fp.bit()); in CODE_AGE_LIST()
1661 __ PrepareCallCFunction(2, 0, r5); in CODE_AGE_LIST()
1662 __ mov(r4, Operand(ExternalReference::isolate_address(masm->isolate()))); in CODE_AGE_LIST()
1663 __ CallCFunction( in CODE_AGE_LIST()
1666 __ MultiPop(r0.bit() | r3.bit() | r4.bit() | r6.bit() | fp.bit()); in CODE_AGE_LIST()
1667 __ mtlr(r0); in CODE_AGE_LIST()
1668 __ mr(ip, r3); in CODE_AGE_LIST()
1671 __ PushStandardFrame(r4); in CODE_AGE_LIST()
1674 __ addi(r3, ip, Operand(kNoCodeAgeSequenceLength)); in CODE_AGE_LIST()
1675 __ Jump(r3); in CODE_AGE_LIST()
1694 __ MultiPush(kJSCallerSaved | kCalleeSaved); in Generate_NotifyStubFailureHelper()
1696 __ CallRuntime(Runtime::kNotifyStubFailure, save_doubles); in Generate_NotifyStubFailureHelper()
1697 __ MultiPop(kJSCallerSaved | kCalleeSaved); in Generate_NotifyStubFailureHelper()
1700 __ addi(sp, sp, Operand(kPointerSize)); // Ignore state in Generate_NotifyStubFailureHelper()
1701 __ blr(); // Jump to miss handler in Generate_NotifyStubFailureHelper()
1717 __ LoadSmiLiteral(r3, Smi::FromInt(static_cast<int>(type))); in Generate_NotifyDeoptimizedHelper()
1718 __ push(r3); in Generate_NotifyDeoptimizedHelper()
1719 __ CallRuntime(Runtime::kNotifyDeoptimized); in Generate_NotifyDeoptimizedHelper()
1723 __ LoadP(r9, MemOperand(sp, 0 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1724 __ SmiUntag(r9); in Generate_NotifyDeoptimizedHelper()
1727 __ cmpi( in Generate_NotifyDeoptimizedHelper()
1730 __ bne(&with_tos_register); in Generate_NotifyDeoptimizedHelper()
1731 __ addi(sp, sp, Operand(1 * kPointerSize)); // Remove state. in Generate_NotifyDeoptimizedHelper()
1732 __ Ret(); in Generate_NotifyDeoptimizedHelper()
1734 __ bind(&with_tos_register); in Generate_NotifyDeoptimizedHelper()
1736 __ LoadP(r3, MemOperand(sp, 1 * kPointerSize)); in Generate_NotifyDeoptimizedHelper()
1737 __ cmpi( in Generate_NotifyDeoptimizedHelper()
1740 __ bne(&unknown_state); in Generate_NotifyDeoptimizedHelper()
1741 __ addi(sp, sp, Operand(2 * kPointerSize)); // Remove state. in Generate_NotifyDeoptimizedHelper()
1742 __ Ret(); in Generate_NotifyDeoptimizedHelper()
1744 __ bind(&unknown_state); in Generate_NotifyDeoptimizedHelper()
1745 __ stop("no cases left"); in Generate_NotifyDeoptimizedHelper()
1770 __ LoadP(signature, FieldMemOperand(function_template_info, in CompatibleReceiverCheck()
1773 __ JumpIfRoot(signature, Heap::kUndefinedValueRootIndex, in CompatibleReceiverCheck()
1777 __ LoadP(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
1779 __ bind(&prototype_loop_start); in CompatibleReceiverCheck()
1782 __ GetMapConstructor(constructor, map, scratch, scratch); in CompatibleReceiverCheck()
1783 __ cmpi(scratch, Operand(JS_FUNCTION_TYPE)); in CompatibleReceiverCheck()
1785 __ bne(&next_prototype); in CompatibleReceiverCheck()
1787 __ LoadP(type, in CompatibleReceiverCheck()
1789 __ LoadP(type, in CompatibleReceiverCheck()
1794 __ bind(&function_template_loop); in CompatibleReceiverCheck()
1797 __ cmp(signature, type); in CompatibleReceiverCheck()
1798 __ beq(&receiver_check_passed); in CompatibleReceiverCheck()
1802 __ JumpIfSmi(type, &next_prototype); in CompatibleReceiverCheck()
1803 __ CompareObjectType(type, scratch, scratch, FUNCTION_TEMPLATE_INFO_TYPE); in CompatibleReceiverCheck()
1804 __ bne(&next_prototype); in CompatibleReceiverCheck()
1807 __ LoadP(type, in CompatibleReceiverCheck()
1809 __ b(&function_template_loop); in CompatibleReceiverCheck()
1812 __ bind(&next_prototype); in CompatibleReceiverCheck()
1813 __ lwz(scratch, FieldMemOperand(map, Map::kBitField3Offset)); in CompatibleReceiverCheck()
1814 __ DecodeField<Map::HasHiddenPrototype>(scratch, SetRC); in CompatibleReceiverCheck()
1815 __ beq(receiver_check_failed, cr0); in CompatibleReceiverCheck()
1817 __ LoadP(receiver, FieldMemOperand(map, Map::kPrototypeOffset)); in CompatibleReceiverCheck()
1818 __ LoadP(map, FieldMemOperand(receiver, HeapObject::kMapOffset)); in CompatibleReceiverCheck()
1820 __ b(&prototype_loop_start); in CompatibleReceiverCheck()
1822 __ bind(&receiver_check_passed); in CompatibleReceiverCheck()
1837 __ LoadP(r6, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in Generate_HandleFastApiCall()
1838 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kFunctionDataOffset)); in Generate_HandleFastApiCall()
1842 __ ShiftLeftImm(r11, r3, Operand(kPointerSizeLog2)); in Generate_HandleFastApiCall()
1843 __ LoadPX(r5, MemOperand(sp, r11)); in Generate_HandleFastApiCall()
1848 __ LoadP(r7, FieldMemOperand(r6, FunctionTemplateInfo::kCallCodeOffset)); in Generate_HandleFastApiCall()
1849 __ LoadP(r7, FieldMemOperand(r7, CallHandlerInfo::kFastHandlerOffset)); in Generate_HandleFastApiCall()
1850 __ addi(ip, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_HandleFastApiCall()
1851 __ JumpToJSEntry(ip); in Generate_HandleFastApiCall()
1854 __ bind(&receiver_check_failed); in Generate_HandleFastApiCall()
1856 __ addi(r11, r11, Operand(kPointerSize)); in Generate_HandleFastApiCall()
1857 __ add(sp, sp, r11); in Generate_HandleFastApiCall()
1858 __ TailCallRuntime(Runtime::kThrowIllegalInvocation); in Generate_HandleFastApiCall()
1865 __ LoadP(r3, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in Generate_OnStackReplacementHelper()
1866 __ LoadP(r3, MemOperand(r3, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
1868 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); in Generate_OnStackReplacementHelper()
1874 __ push(r3); in Generate_OnStackReplacementHelper()
1875 __ CallRuntime(Runtime::kCompileForOnStackReplacement); in Generate_OnStackReplacementHelper()
1880 __ CmpSmiLiteral(r3, Smi::kZero, r0); in Generate_OnStackReplacementHelper()
1881 __ bne(&skip); in Generate_OnStackReplacementHelper()
1882 __ Ret(); in Generate_OnStackReplacementHelper()
1884 __ bind(&skip); in Generate_OnStackReplacementHelper()
1889 __ LeaveFrame(StackFrame::STUB); in Generate_OnStackReplacementHelper()
1894 __ LoadP(r4, FieldMemOperand(r3, Code::kDeoptimizationDataOffset)); in Generate_OnStackReplacementHelper()
1898 __ addi(r3, r3, Operand(Code::kHeaderSize - kHeapObjectTag)); // Code start in Generate_OnStackReplacementHelper()
1901 __ LoadConstantPoolPointerRegisterFromCodeTargetAddress(r3); in Generate_OnStackReplacementHelper()
1906 __ LoadP(r4, FieldMemOperand( in Generate_OnStackReplacementHelper()
1909 __ SmiUntag(r4); in Generate_OnStackReplacementHelper()
1912 __ add(r0, r3, r4); in Generate_OnStackReplacementHelper()
1915 __ mtlr(r0); in Generate_OnStackReplacementHelper()
1916 __ blr(); in Generate_OnStackReplacementHelper()
1945 __ ShiftLeftImm(arg_size, r3, Operand(kPointerSizeLog2)); in Generate_FunctionPrototypeApply()
1946 __ add(new_sp, sp, arg_size); in Generate_FunctionPrototypeApply()
1947 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1948 __ mr(scratch, r3); in Generate_FunctionPrototypeApply()
1949 __ LoadP(r4, MemOperand(new_sp, 0)); // receiver in Generate_FunctionPrototypeApply()
1950 __ cmpi(arg_size, Operand(kPointerSize)); in Generate_FunctionPrototypeApply()
1951 __ blt(&skip); in Generate_FunctionPrototypeApply()
1952 __ LoadP(scratch, MemOperand(new_sp, 1 * -kPointerSize)); // thisArg in Generate_FunctionPrototypeApply()
1953 __ beq(&skip); in Generate_FunctionPrototypeApply()
1954 __ LoadP(r3, MemOperand(new_sp, 2 * -kPointerSize)); // argArray in Generate_FunctionPrototypeApply()
1955 __ bind(&skip); in Generate_FunctionPrototypeApply()
1956 __ mr(sp, new_sp); in Generate_FunctionPrototypeApply()
1957 __ StoreP(scratch, MemOperand(sp, 0)); in Generate_FunctionPrototypeApply()
1968 __ JumpIfSmi(r4, &receiver_not_callable); in Generate_FunctionPrototypeApply()
1969 __ LoadP(r7, FieldMemOperand(r4, HeapObject::kMapOffset)); in Generate_FunctionPrototypeApply()
1970 __ lbz(r7, FieldMemOperand(r7, Map::kBitFieldOffset)); in Generate_FunctionPrototypeApply()
1971 __ TestBit(r7, Map::kIsCallable, r0); in Generate_FunctionPrototypeApply()
1972 __ beq(&receiver_not_callable, cr0); in Generate_FunctionPrototypeApply()
1976 __ JumpIfRoot(r3, Heap::kNullValueRootIndex, &no_arguments); in Generate_FunctionPrototypeApply()
1977 __ JumpIfRoot(r3, Heap::kUndefinedValueRootIndex, &no_arguments); in Generate_FunctionPrototypeApply()
1981 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeApply()
1982 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1986 __ bind(&no_arguments); in Generate_FunctionPrototypeApply()
1988 __ li(r3, Operand::Zero()); in Generate_FunctionPrototypeApply()
1989 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeApply()
1993 __ bind(&receiver_not_callable); in Generate_FunctionPrototypeApply()
1995 __ StoreP(r4, MemOperand(sp, 0)); in Generate_FunctionPrototypeApply()
1996 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_FunctionPrototypeApply()
2006 __ cmpi(r3, Operand::Zero()); in Generate_FunctionPrototypeCall()
2007 __ bne(&done); in Generate_FunctionPrototypeCall()
2008 __ PushRoot(Heap::kUndefinedValueRootIndex); in Generate_FunctionPrototypeCall()
2009 __ addi(r3, r3, Operand(1)); in Generate_FunctionPrototypeCall()
2010 __ bind(&done); in Generate_FunctionPrototypeCall()
2015 __ ShiftLeftImm(r5, r3, Operand(kPointerSizeLog2)); in Generate_FunctionPrototypeCall()
2016 __ LoadPX(r4, MemOperand(sp, r5)); in Generate_FunctionPrototypeCall()
2026 __ add(r5, sp, r5); in Generate_FunctionPrototypeCall()
2028 __ mtctr(r3); in Generate_FunctionPrototypeCall()
2029 __ bind(&loop); in Generate_FunctionPrototypeCall()
2030 __ LoadP(ip, MemOperand(r5, -kPointerSize)); in Generate_FunctionPrototypeCall()
2031 __ StoreP(ip, MemOperand(r5)); in Generate_FunctionPrototypeCall()
2032 __ subi(r5, r5, Operand(kPointerSize)); in Generate_FunctionPrototypeCall()
2033 __ bdnz(&loop); in Generate_FunctionPrototypeCall()
2036 __ subi(r3, r3, Operand(1)); in Generate_FunctionPrototypeCall()
2037 __ pop(); in Generate_FunctionPrototypeCall()
2041 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); in Generate_FunctionPrototypeCall()
2061 __ ShiftLeftImm(arg_size, r3, Operand(kPointerSizeLog2)); in Generate_ReflectApply()
2062 __ add(new_sp, sp, arg_size); in Generate_ReflectApply()
2063 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
2064 __ mr(scratch, r4); in Generate_ReflectApply()
2065 __ mr(r3, r4); in Generate_ReflectApply()
2066 __ cmpi(arg_size, Operand(kPointerSize)); in Generate_ReflectApply()
2067 __ blt(&skip); in Generate_ReflectApply()
2068 __ LoadP(r4, MemOperand(new_sp, 1 * -kPointerSize)); // target in Generate_ReflectApply()
2069 __ beq(&skip); in Generate_ReflectApply()
2070 __ LoadP(scratch, MemOperand(new_sp, 2 * -kPointerSize)); // thisArgument in Generate_ReflectApply()
2071 __ cmpi(arg_size, Operand(2 * kPointerSize)); in Generate_ReflectApply()
2072 __ beq(&skip); in Generate_ReflectApply()
2073 __ LoadP(r3, MemOperand(new_sp, 3 * -kPointerSize)); // argumentsList in Generate_ReflectApply()
2074 __ bind(&skip); in Generate_ReflectApply()
2075 __ mr(sp, new_sp); in Generate_ReflectApply()
2076 __ StoreP(scratch, MemOperand(sp, 0)); in Generate_ReflectApply()
2087 __ JumpIfSmi(r4, &target_not_callable); in Generate_ReflectApply()
2088 __ LoadP(r7, FieldMemOperand(r4, HeapObject::kMapOffset)); in Generate_ReflectApply()
2089 __ lbz(r7, FieldMemOperand(r7, Map::kBitFieldOffset)); in Generate_ReflectApply()
2090 __ TestBit(r7, Map::kIsCallable, r0); in Generate_ReflectApply()
2091 __ beq(&target_not_callable, cr0); in Generate_ReflectApply()
2095 __ LoadRoot(r6, Heap::kUndefinedValueRootIndex); in Generate_ReflectApply()
2096 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectApply()
2099 __ bind(&target_not_callable); in Generate_ReflectApply()
2101 __ StoreP(r4, MemOperand(sp, 0)); in Generate_ReflectApply()
2102 __ TailCallRuntime(Runtime::kThrowApplyNonFunction); in Generate_ReflectApply()
2123 __ ShiftLeftImm(arg_size, r3, Operand(kPointerSizeLog2)); in Generate_ReflectConstruct()
2124 __ add(new_sp, sp, arg_size); in Generate_ReflectConstruct()
2125 __ LoadRoot(r4, Heap::kUndefinedValueRootIndex); in Generate_ReflectConstruct()
2126 __ mr(r3, r4); in Generate_ReflectConstruct()
2127 __ mr(r6, r4); in Generate_ReflectConstruct()
2128 __ StoreP(r4, MemOperand(new_sp, 0)); // receiver (undefined) in Generate_ReflectConstruct()
2129 __ cmpi(arg_size, Operand(kPointerSize)); in Generate_ReflectConstruct()
2130 __ blt(&skip); in Generate_ReflectConstruct()
2131 __ LoadP(r4, MemOperand(new_sp, 1 * -kPointerSize)); // target in Generate_ReflectConstruct()
2132 __ mr(r6, r4); // new.target defaults to target in Generate_ReflectConstruct()
2133 __ beq(&skip); in Generate_ReflectConstruct()
2134 __ LoadP(r3, MemOperand(new_sp, 2 * -kPointerSize)); // argumentsList in Generate_ReflectConstruct()
2135 __ cmpi(arg_size, Operand(2 * kPointerSize)); in Generate_ReflectConstruct()
2136 __ beq(&skip); in Generate_ReflectConstruct()
2137 __ LoadP(r6, MemOperand(new_sp, 3 * -kPointerSize)); // new.target in Generate_ReflectConstruct()
2138 __ bind(&skip); in Generate_ReflectConstruct()
2139 __ mr(sp, new_sp); in Generate_ReflectConstruct()
2151 __ JumpIfSmi(r4, &target_not_constructor); in Generate_ReflectConstruct()
2152 __ LoadP(r7, FieldMemOperand(r4, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
2153 __ lbz(r7, FieldMemOperand(r7, Map::kBitFieldOffset)); in Generate_ReflectConstruct()
2154 __ TestBit(r7, Map::kIsConstructor, r0); in Generate_ReflectConstruct()
2155 __ beq(&target_not_constructor, cr0); in Generate_ReflectConstruct()
2159 __ JumpIfSmi(r6, &new_target_not_constructor); in Generate_ReflectConstruct()
2160 __ LoadP(r7, FieldMemOperand(r6, HeapObject::kMapOffset)); in Generate_ReflectConstruct()
2161 __ lbz(r7, FieldMemOperand(r7, Map::kBitFieldOffset)); in Generate_ReflectConstruct()
2162 __ TestBit(r7, Map::kIsConstructor, r0); in Generate_ReflectConstruct()
2163 __ beq(&new_target_not_constructor, cr0); in Generate_ReflectConstruct()
2166 __ Jump(masm->isolate()->builtins()->Apply(), RelocInfo::CODE_TARGET); in Generate_ReflectConstruct()
2169 __ bind(&target_not_constructor); in Generate_ReflectConstruct()
2171 __ StoreP(r4, MemOperand(sp, 0)); in Generate_ReflectConstruct()
2172 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
2176 __ bind(&new_target_not_constructor); in Generate_ReflectConstruct()
2178 __ StoreP(r6, MemOperand(sp, 0)); in Generate_ReflectConstruct()
2179 __ TailCallRuntime(Runtime::kThrowCalledNonCallable); in Generate_ReflectConstruct()
2184 __ SmiTag(r3); in EnterArgumentsAdaptorFrame()
2185 __ LoadSmiLiteral(r7, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); in EnterArgumentsAdaptorFrame()
2186 __ mflr(r0); in EnterArgumentsAdaptorFrame()
2187 __ push(r0); in EnterArgumentsAdaptorFrame()
2189 __ Push(fp, kConstantPoolRegister, r7, r4, r3); in EnterArgumentsAdaptorFrame()
2191 __ Push(fp, r7, r4, r3); in EnterArgumentsAdaptorFrame()
2193 __ addi(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + in EnterArgumentsAdaptorFrame()
2203 __ LoadP(r4, MemOperand(fp, -(StandardFrameConstants::kFixedFrameSizeFromFp + in LeaveArgumentsAdaptorFrame()
2206 __ LeaveFrame(StackFrame::ARGUMENTS_ADAPTOR, stack_adjustment); in LeaveArgumentsAdaptorFrame()
2207 __ SmiToPtrArrayOffset(r0, r4); in LeaveArgumentsAdaptorFrame()
2208 __ add(sp, sp, r0); in LeaveArgumentsAdaptorFrame()
2223 __ JumpIfSmi(r3, &create_runtime); in Generate_Apply()
2226 __ LoadP(r5, FieldMemOperand(r3, HeapObject::kMapOffset)); in Generate_Apply()
2229 __ LoadP(r7, NativeContextMemOperand()); in Generate_Apply()
2232 __ LoadP(ip, ContextMemOperand(r7, Context::SLOPPY_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2233 __ cmp(ip, r5); in Generate_Apply()
2234 __ beq(&create_arguments); in Generate_Apply()
2235 __ LoadP(ip, ContextMemOperand(r7, Context::STRICT_ARGUMENTS_MAP_INDEX)); in Generate_Apply()
2236 __ cmp(ip, r5); in Generate_Apply()
2237 __ beq(&create_arguments); in Generate_Apply()
2240 __ CompareInstanceType(r5, ip, JS_ARRAY_TYPE); in Generate_Apply()
2241 __ beq(&create_array); in Generate_Apply()
2244 __ bind(&create_runtime); in Generate_Apply()
2247 __ Push(r4, r6, r3); in Generate_Apply()
2248 __ CallRuntime(Runtime::kCreateListFromArrayLike); in Generate_Apply()
2249 __ Pop(r4, r6); in Generate_Apply()
2250 __ LoadP(r5, FieldMemOperand(r3, FixedArray::kLengthOffset)); in Generate_Apply()
2251 __ SmiUntag(r5); in Generate_Apply()
2253 __ b(&done_create); in Generate_Apply()
2256 __ bind(&create_arguments); in Generate_Apply()
2257 __ LoadP(r5, FieldMemOperand(r3, JSArgumentsObject::kLengthOffset)); in Generate_Apply()
2258 __ LoadP(r7, FieldMemOperand(r3, JSObject::kElementsOffset)); in Generate_Apply()
2259 __ LoadP(ip, FieldMemOperand(r7, FixedArray::kLengthOffset)); in Generate_Apply()
2260 __ cmp(r5, ip); in Generate_Apply()
2261 __ bne(&create_runtime); in Generate_Apply()
2262 __ SmiUntag(r5); in Generate_Apply()
2263 __ mr(r3, r7); in Generate_Apply()
2264 __ b(&done_create); in Generate_Apply()
2267 __ bind(&create_array); in Generate_Apply()
2268 __ lbz(r5, FieldMemOperand(r5, Map::kBitField2Offset)); in Generate_Apply()
2269 __ DecodeField<Map::ElementsKindBits>(r5); in Generate_Apply()
2273 __ cmpi(r5, Operand(FAST_ELEMENTS)); in Generate_Apply()
2274 __ bgt(&create_runtime); in Generate_Apply()
2275 __ cmpi(r5, Operand(FAST_HOLEY_SMI_ELEMENTS)); in Generate_Apply()
2276 __ beq(&create_runtime); in Generate_Apply()
2277 __ LoadP(r5, FieldMemOperand(r3, JSArray::kLengthOffset)); in Generate_Apply()
2278 __ LoadP(r3, FieldMemOperand(r3, JSArray::kElementsOffset)); in Generate_Apply()
2279 __ SmiUntag(r5); in Generate_Apply()
2281 __ bind(&done_create); in Generate_Apply()
2289 __ LoadRoot(ip, Heap::kRealStackLimitRootIndex); in Generate_Apply()
2292 __ sub(ip, sp, ip); in Generate_Apply()
2294 __ ShiftLeftImm(r0, r5, Operand(kPointerSizeLog2)); in Generate_Apply()
2295 __ cmp(ip, r0); // Signed comparison. in Generate_Apply()
2296 __ bgt(&done); in Generate_Apply()
2297 __ TailCallRuntime(Runtime::kThrowStackOverflow); in Generate_Apply()
2298 __ bind(&done); in Generate_Apply()
2312 __ cmpi(r5, Operand::Zero()); in Generate_Apply()
2313 __ beq(&no_args); in Generate_Apply()
2314 __ addi(r3, r3, in Generate_Apply()
2316 __ mtctr(r5); in Generate_Apply()
2317 __ bind(&loop); in Generate_Apply()
2318 __ LoadPU(r0, MemOperand(r3, kPointerSize)); in Generate_Apply()
2319 __ push(r0); in Generate_Apply()
2320 __ bdnz(&loop); in Generate_Apply()
2321 __ bind(&no_args); in Generate_Apply()
2322 __ mr(r3, r5); in Generate_Apply()
2327 __ CompareRoot(r6, Heap::kUndefinedValueRootIndex); in Generate_Apply()
2328 __ Jump(masm->isolate()->builtins()->Call(), RelocInfo::CODE_TARGET, eq); in Generate_Apply()
2329 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); in Generate_Apply()
2373 __ mov(scratch1, Operand(is_tail_call_elimination_enabled)); in PrepareForTailCall()
2374 __ lbz(scratch1, MemOperand(scratch1)); in PrepareForTailCall()
2375 __ cmpi(scratch1, Operand::Zero()); in PrepareForTailCall()
2376 __ beq(&done); in PrepareForTailCall()
2381 __ LoadP(scratch3, in PrepareForTailCall()
2383 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::STUB), r0); in PrepareForTailCall()
2384 __ bne(&no_interpreter_frame); in PrepareForTailCall()
2385 __ LoadP(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2386 __ bind(&no_interpreter_frame); in PrepareForTailCall()
2392 __ LoadP(scratch2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); in PrepareForTailCall()
2393 __ LoadP( in PrepareForTailCall()
2396 __ CmpSmiLiteral(scratch3, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); in PrepareForTailCall()
2397 __ bne(&no_arguments_adaptor); in PrepareForTailCall()
2400 __ mr(fp, scratch2); in PrepareForTailCall()
2401 __ LoadP(caller_args_count_reg, in PrepareForTailCall()
2403 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2404 __ b(&formal_parameter_count_loaded); in PrepareForTailCall()
2406 __ bind(&no_arguments_adaptor); in PrepareForTailCall()
2408 __ LoadP(scratch1, in PrepareForTailCall()
2410 __ LoadP(scratch1, in PrepareForTailCall()
2412 __ LoadWordArith( in PrepareForTailCall()
2417 __ SmiUntag(caller_args_count_reg); in PrepareForTailCall()
2420 __ bind(&formal_parameter_count_loaded); in PrepareForTailCall()
2423 __ PrepareForTailCall(callee_args_count, caller_args_count_reg, scratch2, in PrepareForTailCall()
2425 __ bind(&done); in PrepareForTailCall()
2437 __ AssertFunction(r4); in Generate_CallFunction()
2442 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2443 __ lwz(r6, FieldMemOperand(r5, SharedFunctionInfo::kCompilerHintsOffset)); in Generate_CallFunction()
2444 __ TestBitMask(r6, FunctionKind::kClassConstructor in Generate_CallFunction()
2447 __ bne(&class_constructor, cr0); in Generate_CallFunction()
2452 __ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); in Generate_CallFunction()
2455 __ andi(r0, r6, Operand((1 << SharedFunctionInfo::kStrictModeBit) | in Generate_CallFunction()
2457 __ bne(&done_convert, cr0); in Generate_CallFunction()
2468 __ LoadGlobalProxy(r6); in Generate_CallFunction()
2471 __ ShiftLeftImm(r6, r3, Operand(kPointerSizeLog2)); in Generate_CallFunction()
2472 __ LoadPX(r6, MemOperand(sp, r6)); in Generate_CallFunction()
2473 __ JumpIfSmi(r6, &convert_to_object); in Generate_CallFunction()
2475 __ CompareObjectType(r6, r7, r7, FIRST_JS_RECEIVER_TYPE); in Generate_CallFunction()
2476 __ bge(&done_convert); in Generate_CallFunction()
2479 __ JumpIfRoot(r6, Heap::kUndefinedValueRootIndex, in Generate_CallFunction()
2481 __ JumpIfNotRoot(r6, Heap::kNullValueRootIndex, &convert_to_object); in Generate_CallFunction()
2482 __ bind(&convert_global_proxy); in Generate_CallFunction()
2485 __ LoadGlobalProxy(r6); in Generate_CallFunction()
2487 __ b(&convert_receiver); in Generate_CallFunction()
2489 __ bind(&convert_to_object); in Generate_CallFunction()
2495 __ SmiTag(r3); in Generate_CallFunction()
2496 __ Push(r3, r4); in Generate_CallFunction()
2497 __ mr(r3, r6); in Generate_CallFunction()
2498 __ Push(cp); in Generate_CallFunction()
2499 __ Call(masm->isolate()->builtins()->ToObject(), in Generate_CallFunction()
2501 __ Pop(cp); in Generate_CallFunction()
2502 __ mr(r6, r3); in Generate_CallFunction()
2503 __ Pop(r3, r4); in Generate_CallFunction()
2504 __ SmiUntag(r3); in Generate_CallFunction()
2506 __ LoadP(r5, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in Generate_CallFunction()
2507 __ bind(&convert_receiver); in Generate_CallFunction()
2509 __ ShiftLeftImm(r7, r3, Operand(kPointerSizeLog2)); in Generate_CallFunction()
2510 __ StorePX(r6, MemOperand(sp, r7)); in Generate_CallFunction()
2512 __ bind(&done_convert); in Generate_CallFunction()
2525 __ LoadWordArith( in Generate_CallFunction()
2528 __ SmiUntag(r5); in Generate_CallFunction()
2532 __ InvokeFunctionCode(r4, no_reg, expected, actual, JUMP_FUNCTION, in Generate_CallFunction()
2536 __ bind(&class_constructor); in Generate_CallFunction()
2539 __ push(r4); in Generate_CallFunction()
2540 __ CallRuntime(Runtime::kThrowConstructorNonCallableError); in Generate_CallFunction()
2555 __ LoadP(r5, FieldMemOperand(r4, JSBoundFunction::kBoundArgumentsOffset)); in Generate_PushBoundArguments()
2556 __ LoadP(r7, FieldMemOperand(r5, FixedArray::kLengthOffset)); in Generate_PushBoundArguments()
2557 __ SmiUntag(r7, SetRC); in Generate_PushBoundArguments()
2558 __ beq(&no_bound_arguments, cr0); in Generate_PushBoundArguments()
2571 __ mr(r9, sp); // preserve previous stack pointer in Generate_PushBoundArguments()
2572 __ ShiftLeftImm(r10, r7, Operand(kPointerSizeLog2)); in Generate_PushBoundArguments()
2573 __ sub(sp, sp, r10); in Generate_PushBoundArguments()
2577 __ CompareRoot(sp, Heap::kRealStackLimitRootIndex); in Generate_PushBoundArguments()
2578 __ bgt(&done); // Signed comparison. in Generate_PushBoundArguments()
2580 __ mr(sp, r9); in Generate_PushBoundArguments()
2583 __ EnterFrame(StackFrame::INTERNAL); in Generate_PushBoundArguments()
2584 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_PushBoundArguments()
2586 __ bind(&done); in Generate_PushBoundArguments()
2595 __ li(r8, Operand::Zero()); in Generate_PushBoundArguments()
2596 __ cmpi(r3, Operand::Zero()); in Generate_PushBoundArguments()
2597 __ beq(&skip); in Generate_PushBoundArguments()
2598 __ mtctr(r3); in Generate_PushBoundArguments()
2599 __ bind(&loop); in Generate_PushBoundArguments()
2600 __ LoadPX(r0, MemOperand(r9, r8)); in Generate_PushBoundArguments()
2601 __ StorePX(r0, MemOperand(sp, r8)); in Generate_PushBoundArguments()
2602 __ addi(r8, r8, Operand(kPointerSize)); in Generate_PushBoundArguments()
2603 __ bdnz(&loop); in Generate_PushBoundArguments()
2604 __ bind(&skip); in Generate_PushBoundArguments()
2610 __ addi(r5, r5, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); in Generate_PushBoundArguments()
2611 __ add(r5, r5, r10); in Generate_PushBoundArguments()
2612 __ mtctr(r7); in Generate_PushBoundArguments()
2613 __ bind(&loop); in Generate_PushBoundArguments()
2614 __ LoadPU(r0, MemOperand(r5, -kPointerSize)); in Generate_PushBoundArguments()
2615 __ StorePX(r0, MemOperand(sp, r8)); in Generate_PushBoundArguments()
2616 __ addi(r8, r8, Operand(kPointerSize)); in Generate_PushBoundArguments()
2617 __ bdnz(&loop); in Generate_PushBoundArguments()
2618 __ add(r3, r3, r7); in Generate_PushBoundArguments()
2621 __ bind(&no_bound_arguments); in Generate_PushBoundArguments()
2633 __ AssertBoundFunction(r4); in Generate_CallBoundFunctionImpl()
2640 __ LoadP(ip, FieldMemOperand(r4, JSBoundFunction::kBoundThisOffset)); in Generate_CallBoundFunctionImpl()
2641 __ ShiftLeftImm(r0, r3, Operand(kPointerSizeLog2)); in Generate_CallBoundFunctionImpl()
2642 __ StorePX(ip, MemOperand(sp, r0)); in Generate_CallBoundFunctionImpl()
2648 __ LoadP(r4, in Generate_CallBoundFunctionImpl()
2650 __ mov(ip, Operand(ExternalReference(Builtins::kCall_ReceiverIsAny, in Generate_CallBoundFunctionImpl()
2652 __ LoadP(ip, MemOperand(ip)); in Generate_CallBoundFunctionImpl()
2653 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_CallBoundFunctionImpl()
2654 __ JumpToJSEntry(ip); in Generate_CallBoundFunctionImpl()
2666 __ JumpIfSmi(r4, &non_callable); in Generate_Call()
2667 __ bind(&non_smi); in Generate_Call()
2668 __ CompareObjectType(r4, r7, r8, JS_FUNCTION_TYPE); in Generate_Call()
2669 __ Jump(masm->isolate()->builtins()->CallFunction(mode, tail_call_mode), in Generate_Call()
2671 __ cmpi(r8, Operand(JS_BOUND_FUNCTION_TYPE)); in Generate_Call()
2672 __ Jump(masm->isolate()->builtins()->CallBoundFunction(tail_call_mode), in Generate_Call()
2676 __ lbz(r7, FieldMemOperand(r7, Map::kBitFieldOffset)); in Generate_Call()
2677 __ TestBit(r7, Map::kIsCallable, r0); in Generate_Call()
2678 __ beq(&non_callable, cr0); in Generate_Call()
2680 __ cmpi(r8, Operand(JS_PROXY_TYPE)); in Generate_Call()
2681 __ bne(&non_function); in Generate_Call()
2689 __ Push(r4); in Generate_Call()
2692 __ addi(r3, r3, Operand(2)); in Generate_Call()
2694 __ JumpToExternalReference( in Generate_Call()
2699 __ bind(&non_function); in Generate_Call()
2701 __ ShiftLeftImm(r8, r3, Operand(kPointerSizeLog2)); in Generate_Call()
2702 __ StorePX(r4, MemOperand(sp, r8)); in Generate_Call()
2704 __ LoadNativeContextSlot(Context::CALL_AS_FUNCTION_DELEGATE_INDEX, r4); in Generate_Call()
2705 __ Jump(masm->isolate()->builtins()->CallFunction( in Generate_Call()
2710 __ bind(&non_callable); in Generate_Call()
2713 __ Push(r4); in Generate_Call()
2714 __ CallRuntime(Runtime::kThrowCalledNonCallable); in Generate_Call()
2725 __ AssertFunction(r4); in Generate_ConstructFunction()
2729 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); in Generate_ConstructFunction()
2733 __ LoadP(r7, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); in Generate_ConstructFunction()
2734 __ LoadP(r7, FieldMemOperand(r7, SharedFunctionInfo::kConstructStubOffset)); in Generate_ConstructFunction()
2735 __ addi(ip, r7, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_ConstructFunction()
2736 __ JumpToJSEntry(ip); in Generate_ConstructFunction()
2746 __ AssertBoundFunction(r4); in Generate_ConstructBoundFunction()
2753 __ cmp(r4, r6); in Generate_ConstructBoundFunction()
2754 __ bne(&skip); in Generate_ConstructBoundFunction()
2755 __ LoadP(r6, in Generate_ConstructBoundFunction()
2757 __ bind(&skip); in Generate_ConstructBoundFunction()
2760 __ LoadP(r4, in Generate_ConstructBoundFunction()
2762 __ mov(ip, Operand(ExternalReference(Builtins::kConstruct, masm->isolate()))); in Generate_ConstructBoundFunction()
2763 __ LoadP(ip, MemOperand(ip)); in Generate_ConstructBoundFunction()
2764 __ addi(ip, ip, Operand(Code::kHeaderSize - kHeapObjectTag)); in Generate_ConstructBoundFunction()
2765 __ JumpToJSEntry(ip); in Generate_ConstructBoundFunction()
2778 __ Push(r4, r6); in Generate_ConstructProxy()
2780 __ addi(r3, r3, Operand(3)); in Generate_ConstructProxy()
2782 __ JumpToExternalReference( in Generate_ConstructProxy()
2797 __ JumpIfSmi(r4, &non_constructor); in Generate_Construct()
2800 __ CompareObjectType(r4, r7, r8, JS_FUNCTION_TYPE); in Generate_Construct()
2801 __ Jump(masm->isolate()->builtins()->ConstructFunction(), in Generate_Construct()
2805 __ lbz(r5, FieldMemOperand(r7, Map::kBitFieldOffset)); in Generate_Construct()
2806 __ TestBit(r5, Map::kIsConstructor, r0); in Generate_Construct()
2807 __ beq(&non_constructor, cr0); in Generate_Construct()
2811 __ cmpi(r8, Operand(JS_BOUND_FUNCTION_TYPE)); in Generate_Construct()
2812 __ Jump(masm->isolate()->builtins()->ConstructBoundFunction(), in Generate_Construct()
2816 __ cmpi(r8, Operand(JS_PROXY_TYPE)); in Generate_Construct()
2817 __ Jump(masm->isolate()->builtins()->ConstructProxy(), RelocInfo::CODE_TARGET, in Generate_Construct()
2823 __ ShiftLeftImm(r8, r3, Operand(kPointerSizeLog2)); in Generate_Construct()
2824 __ StorePX(r4, MemOperand(sp, r8)); in Generate_Construct()
2826 __ LoadNativeContextSlot(Context::CALL_AS_CONSTRUCTOR_DELEGATE_INDEX, r4); in Generate_Construct()
2827 __ Jump(masm->isolate()->builtins()->CallFunction(), in Generate_Construct()
2833 __ bind(&non_constructor); in Generate_Construct()
2834 __ Jump(masm->isolate()->builtins()->ConstructedNonConstructable(), in Generate_Construct()
2844 __ SmiTag(r4); in Generate_AllocateInNewSpace()
2845 __ Push(r4); in Generate_AllocateInNewSpace()
2846 __ LoadSmiLiteral(cp, Smi::kZero); in Generate_AllocateInNewSpace()
2847 __ TailCallRuntime(Runtime::kAllocateInNewSpace); in Generate_AllocateInNewSpace()
2856 __ SmiTag(r4); in Generate_AllocateInOldSpace()
2857 __ LoadSmiLiteral(r5, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); in Generate_AllocateInOldSpace()
2858 __ Push(r4, r5); in Generate_AllocateInOldSpace()
2859 __ LoadSmiLiteral(cp, Smi::kZero); in Generate_AllocateInOldSpace()
2860 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); in Generate_AllocateInOldSpace()
2869 __ push(r4); in Generate_Abort()
2870 __ LoadSmiLiteral(cp, Smi::kZero); in Generate_Abort()
2871 __ TailCallRuntime(Runtime::kAbort); in Generate_Abort()
2885 __ LoadP(ip, FieldMemOperand(r4, JSFunction::kCodeEntryOffset)); in Generate_ArgumentsAdaptorTrampoline()
2886 __ cmp(r3, r5); in Generate_ArgumentsAdaptorTrampoline()
2887 __ blt(&too_few); in Generate_ArgumentsAdaptorTrampoline()
2888 __ cmpi(r5, Operand(SharedFunctionInfo::kDontAdaptArgumentsSentinel)); in Generate_ArgumentsAdaptorTrampoline()
2889 __ beq(&dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2892 __ bind(&enough); in Generate_ArgumentsAdaptorTrampoline()
2902 __ SmiToPtrArrayOffset(r3, r3); in Generate_ArgumentsAdaptorTrampoline()
2903 __ add(r3, r3, fp); in Generate_ArgumentsAdaptorTrampoline()
2905 __ addi(r3, r3, Operand(2 * kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2906 __ ShiftLeftImm(r7, r5, Operand(kPointerSizeLog2)); in Generate_ArgumentsAdaptorTrampoline()
2907 __ sub(r7, r3, r7); in Generate_ArgumentsAdaptorTrampoline()
2918 __ bind(©); in Generate_ArgumentsAdaptorTrampoline()
2919 __ LoadP(r0, MemOperand(r3, 0)); in Generate_ArgumentsAdaptorTrampoline()
2920 __ push(r0); in Generate_ArgumentsAdaptorTrampoline()
2921 __ cmp(r3, r7); // Compare before moving to next argument. in Generate_ArgumentsAdaptorTrampoline()
2922 __ subi(r3, r3, Operand(kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2923 __ bne(©); in Generate_ArgumentsAdaptorTrampoline()
2925 __ b(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2929 __ bind(&too_few); in Generate_ArgumentsAdaptorTrampoline()
2940 __ SmiToPtrArrayOffset(r3, r3); in Generate_ArgumentsAdaptorTrampoline()
2941 __ add(r3, r3, fp); in Generate_ArgumentsAdaptorTrampoline()
2950 __ bind(©); in Generate_ArgumentsAdaptorTrampoline()
2952 __ LoadP(r0, MemOperand(r3, 2 * kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2953 __ push(r0); in Generate_ArgumentsAdaptorTrampoline()
2954 __ cmp(r3, fp); // Compare before moving to next argument. in Generate_ArgumentsAdaptorTrampoline()
2955 __ subi(r3, r3, Operand(kPointerSize)); in Generate_ArgumentsAdaptorTrampoline()
2956 __ bne(©); in Generate_ArgumentsAdaptorTrampoline()
2963 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); in Generate_ArgumentsAdaptorTrampoline()
2964 __ ShiftLeftImm(r7, r5, Operand(kPointerSizeLog2)); in Generate_ArgumentsAdaptorTrampoline()
2965 __ sub(r7, fp, r7); in Generate_ArgumentsAdaptorTrampoline()
2967 __ subi(r7, r7, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + in Generate_ArgumentsAdaptorTrampoline()
2971 __ bind(&fill); in Generate_ArgumentsAdaptorTrampoline()
2972 __ push(r0); in Generate_ArgumentsAdaptorTrampoline()
2973 __ cmp(sp, r7); in Generate_ArgumentsAdaptorTrampoline()
2974 __ bne(&fill); in Generate_ArgumentsAdaptorTrampoline()
2978 __ bind(&invoke); in Generate_ArgumentsAdaptorTrampoline()
2979 __ mr(r3, r5); in Generate_ArgumentsAdaptorTrampoline()
2983 __ CallJSEntry(ip); in Generate_ArgumentsAdaptorTrampoline()
2990 __ blr(); in Generate_ArgumentsAdaptorTrampoline()
2995 __ bind(&dont_adapt_arguments); in Generate_ArgumentsAdaptorTrampoline()
2996 __ JumpToJSEntry(ip); in Generate_ArgumentsAdaptorTrampoline()
2998 __ bind(&stack_overflow); in Generate_ArgumentsAdaptorTrampoline()
3001 __ CallRuntime(Runtime::kThrowStackOverflow); in Generate_ArgumentsAdaptorTrampoline()
3002 __ bkpt(0); in Generate_ArgumentsAdaptorTrampoline()
3006 #undef __