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

Unified Diff: test/cctest/compiler/value-helper.h

Issue 1773513002: x87: fix the use of CheckFloatEq and CheckDoubleEq in test. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use a do { .. } while(false) to be a good macro citizen. Created 4 years, 9 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 | « test/cctest/compiler/test-run-machops.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/value-helper.h
diff --git a/test/cctest/compiler/value-helper.h b/test/cctest/compiler/value-helper.h
index 83cd33c5b0af90290fcb6ba0e9d08412f00b7aed..7817211c57c6fba2dc57d2a6924c275cb2da389a 100644
--- a/test/cctest/compiler/value-helper.h
+++ b/test/cctest/compiler/value-helper.h
@@ -321,6 +321,12 @@ static inline void CheckFloatEq(volatile float x, volatile float y) {
}
}
+#define CHECK_FLOAT_EQ(lhs, rhs) \
+ do { \
+ volatile float tmp = lhs; \
+ CheckFloatEq(tmp, rhs); \
+ } while (0)
+
static inline void CheckDoubleEq(volatile double x, volatile double y) {
if (std::isnan(x)) {
CHECK(std::isnan(y));
@@ -329,6 +335,12 @@ static inline void CheckDoubleEq(volatile double x, volatile double y) {
}
}
+#define CHECK_DOUBLE_EQ(lhs, rhs) \
+ do { \
+ volatile double tmp = lhs; \
+ CheckDoubleEq(tmp, rhs); \
+ } while (0)
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « test/cctest/compiler/test-run-machops.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698