Fix failing test caused by extra precision in register allocated fp values.

Review URL: http://codereview.chromium.org/5019

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
erik.corry@gmail.com 2008-09-26 23:14:43 +00:00
parent 0f37bdb5fc
commit 062ef05ba6

View File

@ -164,11 +164,18 @@ static inline void CheckEqualsHelper(const char* file,
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;
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;
}