| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 2883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2894 void Builtins::Generate_Abort(MacroAssembler* masm) { | 2894 void Builtins::Generate_Abort(MacroAssembler* masm) { |
| 2895 // ----------- S t a t e ------------- | 2895 // ----------- S t a t e ------------- |
| 2896 // -- a0 : message_id as Smi | 2896 // -- a0 : message_id as Smi |
| 2897 // -- ra : return address | 2897 // -- ra : return address |
| 2898 // ----------------------------------- | 2898 // ----------------------------------- |
| 2899 __ Push(a0); | 2899 __ Push(a0); |
| 2900 __ Move(cp, Smi::FromInt(0)); | 2900 __ Move(cp, Smi::FromInt(0)); |
| 2901 __ TailCallRuntime(Runtime::kAbort); | 2901 __ TailCallRuntime(Runtime::kAbort); |
| 2902 } | 2902 } |
| 2903 | 2903 |
| 2904 // static | |
| 2905 void Builtins::Generate_ToNumber(MacroAssembler* masm) { | |
| 2906 // The ToNumber stub takes one argument in a0. | |
| 2907 Label not_smi; | |
| 2908 __ JumpIfNotSmi(a0, ¬_smi); | |
| 2909 __ Ret(USE_DELAY_SLOT); | |
| 2910 __ mov(v0, a0); | |
| 2911 __ bind(¬_smi); | |
| 2912 | |
| 2913 Label not_heap_number; | |
| 2914 __ GetObjectType(a0, a1, a1); | |
| 2915 // a0: receiver | |
| 2916 // a1: receiver instance type | |
| 2917 __ Branch(¬_heap_number, ne, a1, Operand(HEAP_NUMBER_TYPE)); | |
| 2918 __ Ret(USE_DELAY_SLOT); | |
| 2919 __ mov(v0, a0); | |
| 2920 __ bind(¬_heap_number); | |
| 2921 | |
| 2922 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | |
| 2923 RelocInfo::CODE_TARGET); | |
| 2924 } | |
| 2925 | |
| 2926 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2904 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| 2927 // State setup as expected by MacroAssembler::InvokePrologue. | 2905 // State setup as expected by MacroAssembler::InvokePrologue. |
| 2928 // ----------- S t a t e ------------- | 2906 // ----------- S t a t e ------------- |
| 2929 // -- a0: actual arguments count | 2907 // -- a0: actual arguments count |
| 2930 // -- a1: function (passed through to callee) | 2908 // -- a1: function (passed through to callee) |
| 2931 // -- a2: expected arguments count | 2909 // -- a2: expected arguments count |
| 2932 // -- a3: new target (passed through to callee) | 2910 // -- a3: new target (passed through to callee) |
| 2933 // ----------------------------------- | 2911 // ----------------------------------- |
| 2934 | 2912 |
| 2935 Label invoke, dont_adapt_arguments, stack_overflow; | 2913 Label invoke, dont_adapt_arguments, stack_overflow; |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3052 __ break_(0xCC); | 3030 __ break_(0xCC); |
| 3053 } | 3031 } |
| 3054 } | 3032 } |
| 3055 | 3033 |
| 3056 #undef __ | 3034 #undef __ |
| 3057 | 3035 |
| 3058 } // namespace internal | 3036 } // namespace internal |
| 3059 } // namespace v8 | 3037 } // namespace v8 |
| 3060 | 3038 |
| 3061 #endif // V8_TARGET_ARCH_MIPS | 3039 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |