Index: src/checks.h |
=================================================================== |
--- src/checks.h (revision 388) |
+++ src/checks.h (working copy) |
@@ -164,11 +164,18 @@ |
double expected, |
const char* value_source, |
double value) { |
- if (expected != value) { |
+ // Force values to 64 bit memory to truncate 80 bit precision on IA32. |
+ volatile double* exp = new double[1]; |
+ *exp = expected; |
+ volatile double* val = new double[1]; |
+ *val = value; |
Feng Qian
2008/09/26 23:13:01
ugly (not your fault). LGTM.
|
+ if (*exp != *val) { |
V8_Fatal(file, line, |
"CHECK_EQ(%s, %s) failed\n# Expected: %f\n# Found: %f", |
- expected_source, value_source, expected, value); |
+ expected_source, value_source, *exp, *val); |
} |
+ delete[] exp; |
+ delete[] val; |
} |