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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.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 2097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2108 // ----------------------------------- | 2108 // ----------------------------------- |
2109 __ Integer32ToSmi(rdx, rdx); | 2109 __ Integer32ToSmi(rdx, rdx); |
2110 __ PopReturnAddressTo(rcx); | 2110 __ PopReturnAddressTo(rcx); |
2111 __ Push(rdx); | 2111 __ Push(rdx); |
2112 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | 2112 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
2113 __ PushReturnAddressFrom(rcx); | 2113 __ PushReturnAddressFrom(rcx); |
2114 __ Move(rsi, Smi::FromInt(0)); | 2114 __ Move(rsi, Smi::FromInt(0)); |
2115 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | 2115 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
2116 } | 2116 } |
2117 | 2117 |
2118 // static | |
2119 void Builtins::Generate_Abort(MacroAssembler* masm) { | |
2120 // ----------- S t a t e ------------- | |
2121 // -- rdx : message_id as Smi | |
2122 // -- rsp[0] : return address | |
2123 // ----------------------------------- | |
2124 __ PopReturnAddressTo(rcx); | |
2125 __ Push(rdx); | |
2126 __ PushReturnAddressFrom(rcx); | |
2127 __ Move(rsi, Smi::FromInt(0)); | |
2128 __ TailCallRuntime(Runtime::kAbort); | |
2129 } | |
2130 | |
2131 void Builtins::Generate_StringToNumber(MacroAssembler* masm) { | 2118 void Builtins::Generate_StringToNumber(MacroAssembler* masm) { |
2132 // The StringToNumber stub takes one argument in rax. | 2119 // The StringToNumber stub takes one argument in rax. |
2133 __ AssertString(rax); | 2120 __ AssertString(rax); |
2134 | 2121 |
2135 // Check if string has a cached array index. | 2122 // Check if string has a cached array index. |
2136 Label runtime; | 2123 Label runtime; |
2137 __ testl(FieldOperand(rax, String::kHashFieldOffset), | 2124 __ testl(FieldOperand(rax, String::kHashFieldOffset), |
2138 Immediate(String::kContainsCachedArrayIndexMask)); | 2125 Immediate(String::kContainsCachedArrayIndexMask)); |
2139 __ j(not_zero, &runtime, Label::kNear); | 2126 __ j(not_zero, &runtime, Label::kNear); |
2140 __ movl(rax, FieldOperand(rax, String::kHashFieldOffset)); | 2127 __ movl(rax, FieldOperand(rax, String::kHashFieldOffset)); |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3047 // And "return" to the OSR entry point of the function. | 3034 // And "return" to the OSR entry point of the function. |
3048 __ ret(0); | 3035 __ ret(0); |
3049 } | 3036 } |
3050 | 3037 |
3051 #undef __ | 3038 #undef __ |
3052 | 3039 |
3053 } // namespace internal | 3040 } // namespace internal |
3054 } // namespace v8 | 3041 } // namespace v8 |
3055 | 3042 |
3056 #endif // V8_TARGET_ARCH_X64 | 3043 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |