OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3686 // a0: entry address | 3686 // a0: entry address |
3687 // a1: function | 3687 // a1: function |
3688 // a2: reveiver | 3688 // a2: reveiver |
3689 // a3: argc | 3689 // a3: argc |
3690 // | 3690 // |
3691 // Stack: | 3691 // Stack: |
3692 // 4 args slots | 3692 // 4 args slots |
3693 // args | 3693 // args |
3694 | 3694 |
3695 // Save callee saved registers on the stack. | 3695 // Save callee saved registers on the stack. |
3696 __ MultiPush((kCalleeSaved | ra.bit()) & ~sp.bit()); | 3696 __ MultiPush(kCalleeSaved | ra.bit()); |
3697 | 3697 |
3698 // Load argv in s0 register. | 3698 // Load argv in s0 register. |
3699 __ lw(s0, MemOperand(sp, kNumCalleeSaved * kPointerSize + | 3699 __ lw(s0, MemOperand(sp, (kNumCalleeSaved + 1) * kPointerSize + |
3700 StandardFrameConstants::kCArgsSlotsSize)); | 3700 StandardFrameConstants::kCArgsSlotsSize)); |
3701 | 3701 |
3702 // We build an EntryFrame. | 3702 // We build an EntryFrame. |
3703 __ li(t3, Operand(-1)); // Push a bad frame pointer to fail if it is used. | 3703 __ li(t3, Operand(-1)); // Push a bad frame pointer to fail if it is used. |
3704 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY; | 3704 int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY; |
3705 __ li(t2, Operand(Smi::FromInt(marker))); | 3705 __ li(t2, Operand(Smi::FromInt(marker))); |
3706 __ li(t1, Operand(Smi::FromInt(marker))); | 3706 __ li(t1, Operand(Smi::FromInt(marker))); |
3707 __ li(t0, Operand(ExternalReference(Isolate::k_c_entry_fp_address, | 3707 __ li(t0, Operand(ExternalReference(Isolate::k_c_entry_fp_address, |
3708 masm->isolate()))); | 3708 masm->isolate()))); |
3709 __ lw(t0, MemOperand(t0)); | 3709 __ lw(t0, MemOperand(t0)); |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3823 // Restore the top frame descriptors from the stack. | 3823 // Restore the top frame descriptors from the stack. |
3824 __ pop(t1); | 3824 __ pop(t1); |
3825 __ li(t0, Operand(ExternalReference(Isolate::k_c_entry_fp_address, | 3825 __ li(t0, Operand(ExternalReference(Isolate::k_c_entry_fp_address, |
3826 masm->isolate()))); | 3826 masm->isolate()))); |
3827 __ sw(t1, MemOperand(t0)); | 3827 __ sw(t1, MemOperand(t0)); |
3828 | 3828 |
3829 // Reset the stack to the callee saved registers. | 3829 // Reset the stack to the callee saved registers. |
3830 __ addiu(sp, sp, -EntryFrameConstants::kCallerFPOffset); | 3830 __ addiu(sp, sp, -EntryFrameConstants::kCallerFPOffset); |
3831 | 3831 |
3832 // Restore callee saved registers from the stack. | 3832 // Restore callee saved registers from the stack. |
3833 __ MultiPop((kCalleeSaved | ra.bit()) & ~sp.bit()); | 3833 __ MultiPop(kCalleeSaved | ra.bit()); |
3834 // Return. | 3834 // Return. |
3835 __ Jump(ra); | 3835 __ Jump(ra); |
3836 } | 3836 } |
3837 | 3837 |
3838 | 3838 |
3839 // Uses registers a0 to t0. | 3839 // Uses registers a0 to t0. |
3840 // Expected input (depending on whether args are in registers or on the stack): | 3840 // Expected input (depending on whether args are in registers or on the stack): |
3841 // * object: a0 or at sp + 1 * kPointerSize. | 3841 // * object: a0 or at sp + 1 * kPointerSize. |
3842 // * function: a1 or at sp. | 3842 // * function: a1 or at sp. |
3843 // | 3843 // |
(...skipping 2977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6821 __ mov(result, zero_reg); | 6821 __ mov(result, zero_reg); |
6822 __ Ret(); | 6822 __ Ret(); |
6823 } | 6823 } |
6824 | 6824 |
6825 | 6825 |
6826 #undef __ | 6826 #undef __ |
6827 | 6827 |
6828 } } // namespace v8::internal | 6828 } } // namespace v8::internal |
6829 | 6829 |
6830 #endif // V8_TARGET_ARCH_MIPS | 6830 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |