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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 2897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2908 void Builtins::Generate_Abort(MacroAssembler* masm) { | 2908 void Builtins::Generate_Abort(MacroAssembler* masm) { |
2909 // ----------- S t a t e ------------- | 2909 // ----------- S t a t e ------------- |
2910 // -- r4 : message_id as Smi | 2910 // -- r4 : message_id as Smi |
2911 // -- lr : return address | 2911 // -- lr : return address |
2912 // ----------------------------------- | 2912 // ----------------------------------- |
2913 __ push(r4); | 2913 __ push(r4); |
2914 __ LoadSmiLiteral(cp, Smi::FromInt(0)); | 2914 __ LoadSmiLiteral(cp, Smi::FromInt(0)); |
2915 __ TailCallRuntime(Runtime::kAbort); | 2915 __ TailCallRuntime(Runtime::kAbort); |
2916 } | 2916 } |
2917 | 2917 |
2918 // static | |
2919 void Builtins::Generate_ToNumber(MacroAssembler* masm) { | |
2920 // The ToNumber stub takes one argument in r3. | |
2921 STATIC_ASSERT(kSmiTag == 0); | |
2922 __ TestIfSmi(r3, r0); | |
2923 __ Ret(eq, cr0); | |
2924 | |
2925 __ CompareObjectType(r3, r4, r4, HEAP_NUMBER_TYPE); | |
2926 // r3: receiver | |
2927 // r4: receiver instance type | |
2928 __ Ret(eq); | |
2929 | |
2930 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | |
2931 RelocInfo::CODE_TARGET); | |
2932 } | |
2933 | |
2934 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2918 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2935 // ----------- S t a t e ------------- | 2919 // ----------- S t a t e ------------- |
2936 // -- r3 : actual number of arguments | 2920 // -- r3 : actual number of arguments |
2937 // -- r4 : function (passed through to callee) | 2921 // -- r4 : function (passed through to callee) |
2938 // -- r5 : expected number of arguments | 2922 // -- r5 : expected number of arguments |
2939 // -- r6 : new target (passed through to callee) | 2923 // -- r6 : new target (passed through to callee) |
2940 // ----------------------------------- | 2924 // ----------------------------------- |
2941 | 2925 |
2942 Label invoke, dont_adapt_arguments, stack_overflow; | 2926 Label invoke, dont_adapt_arguments, stack_overflow; |
2943 | 2927 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3061 __ CallRuntime(Runtime::kThrowStackOverflow); | 3045 __ CallRuntime(Runtime::kThrowStackOverflow); |
3062 __ bkpt(0); | 3046 __ bkpt(0); |
3063 } | 3047 } |
3064 } | 3048 } |
3065 | 3049 |
3066 #undef __ | 3050 #undef __ |
3067 } // namespace internal | 3051 } // namespace internal |
3068 } // namespace v8 | 3052 } // namespace v8 |
3069 | 3053 |
3070 #endif // V8_TARGET_ARCH_PPC | 3054 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |