Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Side by Side Diff: src/ppc/simulator-ppc.cc

Issue 1440733002: PPC64: Implemented the RoundUint64ToFloat64 TurboFan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after
2885 } 2885 }
2886 case FCFID: { 2886 case FCFID: {
2887 int frt = instr->RTValue(); 2887 int frt = instr->RTValue();
2888 int frb = instr->RBValue(); 2888 int frb = instr->RBValue();
2889 double t_val = get_double_from_d_register(frb); 2889 double t_val = get_double_from_d_register(frb);
2890 int64_t* frb_val_p = reinterpret_cast<int64_t*>(&t_val); 2890 int64_t* frb_val_p = reinterpret_cast<int64_t*>(&t_val);
2891 double frt_val = static_cast<double>(*frb_val_p); 2891 double frt_val = static_cast<double>(*frb_val_p);
2892 set_d_register_from_double(frt, frt_val); 2892 set_d_register_from_double(frt, frt_val);
2893 return; 2893 return;
2894 } 2894 }
2895 case FCFIDU: {
2896 int frt = instr->RTValue();
2897 int frb = instr->RBValue();
2898 double t_val = get_double_from_d_register(frb);
2899 uint64_t* frb_val_p = reinterpret_cast<uint64_t*>(&t_val);
2900 double frt_val = static_cast<double>(*frb_val_p);
2901 set_d_register_from_double(frt, frt_val);
2902 return;
2903 }
2895 case FCTID: { 2904 case FCTID: {
2896 int frt = instr->RTValue(); 2905 int frt = instr->RTValue();
2897 int frb = instr->RBValue(); 2906 int frb = instr->RBValue();
2898 double frb_val = get_double_from_d_register(frb); 2907 double frb_val = get_double_from_d_register(frb);
2899 int64_t frt_val; 2908 int64_t frt_val;
2900 int64_t one = 1; // work-around gcc 2909 int64_t one = 1; // work-around gcc
2901 int64_t kMinLongLong = (one << 63); 2910 int64_t kMinLongLong = (one << 63);
2902 int64_t kMaxLongLong = kMinLongLong - 1; 2911 int64_t kMaxLongLong = kMinLongLong - 1;
2903 2912
2904 if (frb_val > kMaxLongLong) { 2913 if (frb_val > kMaxLongLong) {
(...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3945 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); 3954 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp);
3946 uintptr_t address = *stack_slot; 3955 uintptr_t address = *stack_slot;
3947 set_register(sp, current_sp + sizeof(uintptr_t)); 3956 set_register(sp, current_sp + sizeof(uintptr_t));
3948 return address; 3957 return address;
3949 } 3958 }
3950 } // namespace internal 3959 } // namespace internal
3951 } // namespace v8 3960 } // namespace v8
3952 3961
3953 #endif // USE_SIMULATOR 3962 #endif // USE_SIMULATOR
3954 #endif // V8_TARGET_ARCH_PPC 3963 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698