| 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/v8.h" | 5 #include "src/v8.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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 Register temp1, | 512 Register temp1, |
| 513 Register temp2, | 513 Register temp2, |
| 514 Register temp3) { | 514 Register temp3) { |
| 515 // TODO(jbramley): There are several instances where fnmsub could be used | 515 // TODO(jbramley): There are several instances where fnmsub could be used |
| 516 // instead of fmul and fsub. Doing this changes the result, but since this is | 516 // instead of fmul and fsub. Doing this changes the result, but since this is |
| 517 // an estimation anyway, does it matter? | 517 // an estimation anyway, does it matter? |
| 518 | 518 |
| 519 ASSERT(!AreAliased(input, result, | 519 ASSERT(!AreAliased(input, result, |
| 520 double_temp1, double_temp2, | 520 double_temp1, double_temp2, |
| 521 temp1, temp2, temp3)); | 521 temp1, temp2, temp3)); |
| 522 // Serializer does not know how to encode references to math_exp_constants |
| 523 // table. See ExternalReferenceTable::PopulateTable. |
| 524 ASSERT(!masm->serializer_enabled()); |
| 522 ASSERT(ExternalReference::math_exp_constants(0).address() != NULL); | 525 ASSERT(ExternalReference::math_exp_constants(0).address() != NULL); |
| 523 | 526 |
| 524 Label done; | 527 Label done; |
| 525 DoubleRegister double_temp3 = result; | 528 DoubleRegister double_temp3 = result; |
| 526 Register constants = temp3; | 529 Register constants = temp3; |
| 527 | 530 |
| 528 // The algorithm used relies on some magic constants which are initialized in | 531 // The algorithm used relies on some magic constants which are initialized in |
| 529 // ExternalReference::InitializeMathExpData(). | 532 // ExternalReference::InitializeMathExpData(). |
| 530 | 533 |
| 531 // Load the address of the start of the array. | 534 // Load the address of the start of the array. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 __ Fmul(result, double_temp3, double_temp1); | 619 __ Fmul(result, double_temp3, double_temp1); |
| 617 | 620 |
| 618 __ Bind(&done); | 621 __ Bind(&done); |
| 619 } | 622 } |
| 620 | 623 |
| 621 #undef __ | 624 #undef __ |
| 622 | 625 |
| 623 } } // namespace v8::internal | 626 } } // namespace v8::internal |
| 624 | 627 |
| 625 #endif // V8_TARGET_ARCH_ARM64 | 628 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |