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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 DCHECK(!AreAliased(input, result, | 519 DCHECK(!AreAliased(input, result, |
520 double_temp1, double_temp2, | 520 double_temp1, double_temp2, |
521 temp1, temp2, temp3)); | 521 temp1, temp2, temp3)); |
522 DCHECK(ExternalReference::math_exp_constants(0).address() != NULL); | 522 DCHECK(ExternalReference::math_exp_constants(0).address() != NULL); |
| 523 DCHECK(!masm->serializer_enabled()); // External references not serializable. |
523 | 524 |
524 Label done; | 525 Label done; |
525 DoubleRegister double_temp3 = result; | 526 DoubleRegister double_temp3 = result; |
526 Register constants = temp3; | 527 Register constants = temp3; |
527 | 528 |
528 // The algorithm used relies on some magic constants which are initialized in | 529 // The algorithm used relies on some magic constants which are initialized in |
529 // ExternalReference::InitializeMathExpData(). | 530 // ExternalReference::InitializeMathExpData(). |
530 | 531 |
531 // Load the address of the start of the array. | 532 // Load the address of the start of the array. |
532 __ Mov(constants, ExternalReference::math_exp_constants(0)); | 533 __ Mov(constants, ExternalReference::math_exp_constants(0)); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 __ Fmul(result, double_temp3, double_temp1); | 617 __ Fmul(result, double_temp3, double_temp1); |
617 | 618 |
618 __ Bind(&done); | 619 __ Bind(&done); |
619 } | 620 } |
620 | 621 |
621 #undef __ | 622 #undef __ |
622 | 623 |
623 } } // namespace v8::internal | 624 } } // namespace v8::internal |
624 | 625 |
625 #endif // V8_TARGET_ARCH_ARM64 | 626 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |