| 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 #include "src/arm64/codegen-arm64.h" | 5 #include "src/arm64/codegen-arm64.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/arm64/simulator-arm64.h" | 9 #include "src/arm64/simulator-arm64.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) { | 31 UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) { |
| 32 // Use the Math.exp implemetation in MathExpGenerator::EmitMathExp() to create | 32 // Use the Math.exp implemetation in MathExpGenerator::EmitMathExp() to create |
| 33 // an AAPCS64-compliant exp() function. This will be faster than the C | 33 // an AAPCS64-compliant exp() function. This will be faster than the C |
| 34 // library's exp() function, but probably less accurate. | 34 // library's exp() function, but probably less accurate. |
| 35 size_t actual_size; | 35 size_t actual_size; |
| 36 byte* buffer = | 36 byte* buffer = |
| 37 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); | 37 static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); |
| 38 if (buffer == nullptr) return nullptr; | 38 if (buffer == nullptr) return nullptr; |
| 39 | 39 |
| 40 ExternalReference::InitializeMathExpData(); | 40 ExternalReference::InitializeMathExpData(); |
| 41 MacroAssembler masm(nullptr, buffer, static_cast<int>(actual_size)); | 41 MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), false); |
| 42 masm.SetStackPointer(csp); | 42 masm.SetStackPointer(csp); |
| 43 | 43 |
| 44 // The argument will be in d0 on entry. | 44 // The argument will be in d0 on entry. |
| 45 DoubleRegister input = d0; | 45 DoubleRegister input = d0; |
| 46 // Use other caller-saved registers for all other values. | 46 // Use other caller-saved registers for all other values. |
| 47 DoubleRegister result = d1; | 47 DoubleRegister result = d1; |
| 48 DoubleRegister double_temp1 = d2; | 48 DoubleRegister double_temp1 = d2; |
| 49 DoubleRegister double_temp2 = d3; | 49 DoubleRegister double_temp2 = d3; |
| 50 Register temp1 = x10; | 50 Register temp1 = x10; |
| 51 Register temp2 = x11; | 51 Register temp2 = x11; |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 | 629 |
| 630 __ Bind(&done); | 630 __ Bind(&done); |
| 631 } | 631 } |
| 632 | 632 |
| 633 #undef __ | 633 #undef __ |
| 634 | 634 |
| 635 } // namespace internal | 635 } // namespace internal |
| 636 } // namespace v8 | 636 } // namespace v8 |
| 637 | 637 |
| 638 #endif // V8_TARGET_ARCH_ARM64 | 638 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |