| 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 #if V8_TARGET_ARCH_PPC | 9 #if V8_TARGET_ARCH_PPC |
| 10 | 10 |
| (...skipping 2689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2700 switch (opcode) { | 2700 switch (opcode) { |
| 2701 case FCFID: { | 2701 case FCFID: { |
| 2702 // fcfids | 2702 // fcfids |
| 2703 int frt = instr->RTValue(); | 2703 int frt = instr->RTValue(); |
| 2704 int frb = instr->RBValue(); | 2704 int frb = instr->RBValue(); |
| 2705 int64_t frb_val = get_d_register(frb); | 2705 int64_t frb_val = get_d_register(frb); |
| 2706 double frt_val = static_cast<float>(frb_val); | 2706 double frt_val = static_cast<float>(frb_val); |
| 2707 set_d_register_from_double(frt, frt_val); | 2707 set_d_register_from_double(frt, frt_val); |
| 2708 return; | 2708 return; |
| 2709 } | 2709 } |
| 2710 case FCFIDU: { |
| 2711 // fcfidus |
| 2712 int frt = instr->RTValue(); |
| 2713 int frb = instr->RBValue(); |
| 2714 uint64_t frb_val = get_d_register(frb); |
| 2715 double frt_val = static_cast<float>(frb_val); |
| 2716 set_d_register_from_double(frt, frt_val); |
| 2717 return; |
| 2718 } |
| 2710 } | 2719 } |
| 2711 UNIMPLEMENTED(); // Not used by V8. | 2720 UNIMPLEMENTED(); // Not used by V8. |
| 2712 } | 2721 } |
| 2713 | 2722 |
| 2714 | 2723 |
| 2715 void Simulator::ExecuteExt4(Instruction* instr) { | 2724 void Simulator::ExecuteExt4(Instruction* instr) { |
| 2716 switch (instr->Bits(5, 1) << 1) { | 2725 switch (instr->Bits(5, 1) << 1) { |
| 2717 case FDIV: { | 2726 case FDIV: { |
| 2718 int frt = instr->RTValue(); | 2727 int frt = instr->RTValue(); |
| 2719 int fra = instr->RAValue(); | 2728 int fra = instr->RAValue(); |
| (...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3948 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); | 3957 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); |
| 3949 uintptr_t address = *stack_slot; | 3958 uintptr_t address = *stack_slot; |
| 3950 set_register(sp, current_sp + sizeof(uintptr_t)); | 3959 set_register(sp, current_sp + sizeof(uintptr_t)); |
| 3951 return address; | 3960 return address; |
| 3952 } | 3961 } |
| 3953 } // namespace internal | 3962 } // namespace internal |
| 3954 } // namespace v8 | 3963 } // namespace v8 |
| 3955 | 3964 |
| 3956 #endif // USE_SIMULATOR | 3965 #endif // USE_SIMULATOR |
| 3957 #endif // V8_TARGET_ARCH_PPC | 3966 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |