OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 <stdarg.h> | 5 #include <stdarg.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 2595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2606 double fra_val = get_double_from_d_register(fra); | 2606 double fra_val = get_double_from_d_register(fra); |
2607 double frb_val = get_double_from_d_register(frb); | 2607 double frb_val = get_double_from_d_register(frb); |
2608 double frt_val = fra_val + frb_val; | 2608 double frt_val = fra_val + frb_val; |
2609 set_d_register_from_double(frt, frt_val); | 2609 set_d_register_from_double(frt, frt_val); |
2610 return; | 2610 return; |
2611 } | 2611 } |
2612 case FSQRT: { | 2612 case FSQRT: { |
2613 int frt = instr->RTValue(); | 2613 int frt = instr->RTValue(); |
2614 int frb = instr->RBValue(); | 2614 int frb = instr->RBValue(); |
2615 double frb_val = get_double_from_d_register(frb); | 2615 double frb_val = get_double_from_d_register(frb); |
2616 double frt_val = std::sqrt(frb_val); | 2616 double frt_val = fast_sqrt(frb_val); |
2617 set_d_register_from_double(frt, frt_val); | 2617 set_d_register_from_double(frt, frt_val); |
2618 return; | 2618 return; |
2619 } | 2619 } |
2620 case FSEL: { | 2620 case FSEL: { |
2621 int frt = instr->RTValue(); | 2621 int frt = instr->RTValue(); |
2622 int fra = instr->RAValue(); | 2622 int fra = instr->RAValue(); |
2623 int frb = instr->RBValue(); | 2623 int frb = instr->RBValue(); |
2624 int frc = instr->RCValue(); | 2624 int frc = instr->RCValue(); |
2625 double fra_val = get_double_from_d_register(fra); | 2625 double fra_val = get_double_from_d_register(fra); |
2626 double frb_val = get_double_from_d_register(frb); | 2626 double frb_val = get_double_from_d_register(frb); |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3794 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); | 3794 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); |
3795 uintptr_t address = *stack_slot; | 3795 uintptr_t address = *stack_slot; |
3796 set_register(sp, current_sp + sizeof(uintptr_t)); | 3796 set_register(sp, current_sp + sizeof(uintptr_t)); |
3797 return address; | 3797 return address; |
3798 } | 3798 } |
3799 } | 3799 } |
3800 } // namespace v8::internal | 3800 } // namespace v8::internal |
3801 | 3801 |
3802 #endif // USE_SIMULATOR | 3802 #endif // USE_SIMULATOR |
3803 #endif // V8_TARGET_ARCH_PPC | 3803 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |