OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 __ Bind(&call_runtime); | 964 __ Bind(&call_runtime); |
965 // Put the arguments back on the stack. | 965 // Put the arguments back on the stack. |
966 __ Push(base_tagged, exponent_tagged); | 966 __ Push(base_tagged, exponent_tagged); |
967 __ TailCallRuntime(Runtime::kMathPowRT); | 967 __ TailCallRuntime(Runtime::kMathPowRT); |
968 | 968 |
969 // Return. | 969 // Return. |
970 __ Bind(&done); | 970 __ Bind(&done); |
971 __ AllocateHeapNumber(result_tagged, &call_runtime, scratch0, scratch1, | 971 __ AllocateHeapNumber(result_tagged, &call_runtime, scratch0, scratch1, |
972 result_double); | 972 result_double); |
973 DCHECK(result_tagged.is(x0)); | 973 DCHECK(result_tagged.is(x0)); |
974 __ IncrementCounter( | |
975 isolate()->counters()->math_pow(), 1, scratch0, scratch1); | |
976 __ Ret(); | 974 __ Ret(); |
977 } else { | 975 } else { |
978 AllowExternalCallThatCantCauseGC scope(masm); | 976 AllowExternalCallThatCantCauseGC scope(masm); |
979 __ Mov(saved_lr, lr); | 977 __ Mov(saved_lr, lr); |
980 __ Fmov(base_double, base_double_copy); | 978 __ Fmov(base_double, base_double_copy); |
981 __ Scvtf(exponent_double, exponent_integer); | 979 __ Scvtf(exponent_double, exponent_integer); |
982 __ CallCFunction( | 980 __ CallCFunction( |
983 ExternalReference::power_double_double_function(isolate()), | 981 ExternalReference::power_double_double_function(isolate()), |
984 0, 2); | 982 0, 2); |
985 __ Mov(lr, saved_lr); | 983 __ Mov(lr, saved_lr); |
986 __ Bind(&done); | 984 __ Bind(&done); |
987 __ IncrementCounter( | |
988 isolate()->counters()->math_pow(), 1, scratch0, scratch1); | |
989 __ Ret(); | 985 __ Ret(); |
990 } | 986 } |
991 } | 987 } |
992 | 988 |
993 | 989 |
994 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { | 990 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { |
995 // It is important that the following stubs are generated in this order | 991 // It is important that the following stubs are generated in this order |
996 // because pregenerated stubs can only call other pregenerated stubs. | 992 // because pregenerated stubs can only call other pregenerated stubs. |
997 // RecordWriteStub uses StoreBufferOverflowStub, which in turn uses | 993 // RecordWriteStub uses StoreBufferOverflowStub, which in turn uses |
998 // CEntryStub. | 994 // CEntryStub. |
(...skipping 4895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5894 return_value_operand, NULL); | 5890 return_value_operand, NULL); |
5895 } | 5891 } |
5896 | 5892 |
5897 | 5893 |
5898 #undef __ | 5894 #undef __ |
5899 | 5895 |
5900 } // namespace internal | 5896 } // namespace internal |
5901 } // namespace v8 | 5897 } // namespace v8 |
5902 | 5898 |
5903 #endif // V8_TARGET_ARCH_ARM64 | 5899 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |