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

Unified Diff: test/cctest/test-assembler-mips64.cc

Issue 2539133002: Fix MIPS maddf and msubf instructions in simulator and tests. (Closed)
Patch Set: Fix of errors. Created 4 years 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 | « test/cctest/test-assembler-mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-assembler-mips64.cc
diff --git a/test/cctest/test-assembler-mips64.cc b/test/cctest/test-assembler-mips64.cc
index b0315343b51b50614ff12048c992f5842b9a5974..0ec51723e9c8b4f91328a6b42f858eeeae56df60 100644
--- a/test/cctest/test-assembler-mips64.cc
+++ b/test/cctest/test-assembler-mips64.cc
@@ -6005,12 +6005,14 @@ void helper_madd_msub_maddf_msubf(F func) {
(CALL_GENERATED_CODE(isolate, f, &tc, 0, 0, 0, 0));
- T res_add = tc.fr + (tc.fs * tc.ft);
T res_sub;
+ T res_add;
if (kArchVariant != kMips64r6) {
+ res_add = tc.fr + (tc.fs * tc.ft);
res_sub = (tc.fs * tc.ft) - tc.fr;
} else {
- res_sub = tc.fr - (tc.fs * tc.ft);
+ res_add = std::fma(tc.fs, tc.ft, tc.fr);
+ res_sub = std::fma(-tc.fs, tc.ft, tc.fr);
}
CHECK_EQ(tc.fd_add, res_add);
« no previous file with comments | « test/cctest/test-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698