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

Unified Diff: src/ppc/simulator-ppc.cc

Issue 1409073016: PPC64: Implemented the RoundInt64ToFloat32 TurboFan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix build break in simulator. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ppc/simulator-ppc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/simulator-ppc.cc
diff --git a/src/ppc/simulator-ppc.cc b/src/ppc/simulator-ppc.cc
index cdce60eb5980f73ffa5015b0199a3595d454e137..5b817d5cad74ca6b4301dc72334aaf02ef0c5349 100644
--- a/src/ppc/simulator-ppc.cc
+++ b/src/ppc/simulator-ppc.cc
@@ -2679,6 +2679,24 @@ void Simulator::ExecuteExt2(Instruction* instr) {
}
+void Simulator::ExecuteExt3(Instruction* instr) {
+ int opcode = instr->Bits(10, 1) << 1;
+ switch (opcode) {
+ case FCFID: {
+ // fcfids
+ int frt = instr->RTValue();
+ int frb = instr->RBValue();
+ double t_val = get_double_from_d_register(frb);
+ int64_t* frb_val_p = reinterpret_cast<int64_t*>(&t_val);
+ double frt_val = static_cast<float>(*frb_val_p);
+ set_d_register_from_double(frt, frt_val);
+ return;
+ }
+ }
+ UNIMPLEMENTED(); // Not used by V8.
+}
+
+
void Simulator::ExecuteExt4(Instruction* instr) {
switch (instr->Bits(5, 1) << 1) {
case FDIV: {
@@ -3594,8 +3612,10 @@ void Simulator::ExecuteGeneric(Instruction* instr) {
break;
}
- case EXT3:
- UNIMPLEMENTED();
+ case EXT3: {
+ ExecuteExt3(instr);
+ break;
+ }
case EXT4: {
ExecuteExt4(instr);
break;
« no previous file with comments | « src/ppc/simulator-ppc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698