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

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

Issue 1659883002: Reland of MIPS: Add FPXX support to MIPS32R2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix failure in RunFloat64InsertLowWord32 test Created 4 years, 10 months 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/mips/macro-assembler-mips.cc ('k') | test/cctest/test-assembler-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/simulator-mips.cc
diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc
index f0d55d938f65552e69fa107f79a78c69f00eb4f5..4c4b1a374f449c8692241d29c0d91a1899100713 100644
--- a/src/mips/simulator-mips.cc
+++ b/src/mips/simulator-mips.cc
@@ -3406,7 +3406,11 @@ void Simulator::DecodeTypeRegisterCOP1() {
set_register(rt_reg(), get_fpu_register_word(fs_reg()));
break;
case MFHC1:
- set_register(rt_reg(), get_fpu_register_hi_word(fs_reg()));
+ if (IsFp64Mode()) {
+ set_register(rt_reg(), get_fpu_register_hi_word(fs_reg()));
+ } else {
+ set_register(rt_reg(), get_fpu_register_word(fs_reg() + 1));
+ }
break;
case CTC1: {
// At the moment only FCSR is supported.
@@ -3426,7 +3430,11 @@ void Simulator::DecodeTypeRegisterCOP1() {
set_fpu_register_word(fs_reg(), registers_[rt_reg()]);
break;
case MTHC1:
- set_fpu_register_hi_word(fs_reg(), registers_[rt_reg()]);
+ if (IsFp64Mode()) {
+ set_fpu_register_hi_word(fs_reg(), registers_[rt_reg()]);
+ } else {
+ set_fpu_register_word(fs_reg() + 1, registers_[rt_reg()]);
+ }
break;
case S: {
DecodeTypeRegisterSRsType();
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | test/cctest/test-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698