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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 2909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2920 void Builtins::Generate_Abort(MacroAssembler* masm) { | 2920 void Builtins::Generate_Abort(MacroAssembler* masm) { |
2921 // ----------- S t a t e ------------- | 2921 // ----------- S t a t e ------------- |
2922 // -- r3 : message_id as Smi | 2922 // -- r3 : message_id as Smi |
2923 // -- lr : return address | 2923 // -- lr : return address |
2924 // ----------------------------------- | 2924 // ----------------------------------- |
2925 __ push(r3); | 2925 __ push(r3); |
2926 __ LoadSmiLiteral(cp, Smi::FromInt(0)); | 2926 __ LoadSmiLiteral(cp, Smi::FromInt(0)); |
2927 __ TailCallRuntime(Runtime::kAbort); | 2927 __ TailCallRuntime(Runtime::kAbort); |
2928 } | 2928 } |
2929 | 2929 |
2930 // static | |
2931 void Builtins::Generate_ToNumber(MacroAssembler* masm) { | |
2932 // The ToNumber stub takes one argument in r2. | |
2933 STATIC_ASSERT(kSmiTag == 0); | |
2934 __ TestIfSmi(r2); | |
2935 __ Ret(eq); | |
2936 | |
2937 __ CompareObjectType(r2, r3, r3, HEAP_NUMBER_TYPE); | |
2938 // r2: receiver | |
2939 // r3: receiver instance type | |
2940 __ Ret(eq); | |
2941 | |
2942 __ Jump(masm->isolate()->builtins()->NonNumberToNumber(), | |
2943 RelocInfo::CODE_TARGET); | |
2944 } | |
2945 | |
2946 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2930 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2947 // ----------- S t a t e ------------- | 2931 // ----------- S t a t e ------------- |
2948 // -- r2 : actual number of arguments | 2932 // -- r2 : actual number of arguments |
2949 // -- r3 : function (passed through to callee) | 2933 // -- r3 : function (passed through to callee) |
2950 // -- r4 : expected number of arguments | 2934 // -- r4 : expected number of arguments |
2951 // -- r5 : new target (passed through to callee) | 2935 // -- r5 : new target (passed through to callee) |
2952 // ----------------------------------- | 2936 // ----------------------------------- |
2953 | 2937 |
2954 Label invoke, dont_adapt_arguments, stack_overflow; | 2938 Label invoke, dont_adapt_arguments, stack_overflow; |
2955 | 2939 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3073 __ bkpt(0); | 3057 __ bkpt(0); |
3074 } | 3058 } |
3075 } | 3059 } |
3076 | 3060 |
3077 #undef __ | 3061 #undef __ |
3078 | 3062 |
3079 } // namespace internal | 3063 } // namespace internal |
3080 } // namespace v8 | 3064 } // namespace v8 |
3081 | 3065 |
3082 #endif // V8_TARGET_ARCH_S390 | 3066 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |