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

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 1430943002: X87: Change the test case for X87 float operations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/cctest.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-run-machops.cc
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
index 257569bf6d973210ef213c83d53982074ad090cd..07cc9785bfeb0709725895f07277a94c875eac1c 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -3242,7 +3242,10 @@ TEST(RunFloat32Add) {
m.Return(m.Float32Add(m.Parameter(0), m.Parameter(1)));
FOR_FLOAT32_INPUTS(i) {
- FOR_FLOAT32_INPUTS(j) { CheckFloatEq(*i + *j, m.Call(*i, *j)); }
+ FOR_FLOAT32_INPUTS(j) {
+ volatile float expected = *i + *j;
+ CheckFloatEq(expected, m.Call(*i, *j));
+ }
}
}
@@ -3252,7 +3255,10 @@ TEST(RunFloat32Sub) {
m.Return(m.Float32Sub(m.Parameter(0), m.Parameter(1)));
FOR_FLOAT32_INPUTS(i) {
- FOR_FLOAT32_INPUTS(j) { CheckFloatEq(*i - *j, m.Call(*i, *j)); }
+ FOR_FLOAT32_INPUTS(j) {
+ volatile float expected = *i - *j;
+ CheckFloatEq(expected, m.Call(*i, *j));
+ }
}
}
@@ -3262,7 +3268,10 @@ TEST(RunFloat32Mul) {
m.Return(m.Float32Mul(m.Parameter(0), m.Parameter(1)));
FOR_FLOAT32_INPUTS(i) {
- FOR_FLOAT32_INPUTS(j) { CheckFloatEq(*i * *j, m.Call(*i, *j)); }
+ FOR_FLOAT32_INPUTS(j) {
+ volatile float expected = *i * *j;
+ CheckFloatEq(expected, m.Call(*i, *j));
+ }
}
}
@@ -3272,7 +3281,10 @@ TEST(RunFloat32Div) {
m.Return(m.Float32Div(m.Parameter(0), m.Parameter(1)));
FOR_FLOAT32_INPUTS(i) {
- FOR_FLOAT32_INPUTS(j) { CheckFloatEq(*i / *j, m.Call(*i, *j)); }
+ FOR_FLOAT32_INPUTS(j) {
+ volatile float expected = *i / *j;
+ CheckFloatEq(expected, m.Call(*i, *j));
+ }
}
}
@@ -3302,7 +3314,10 @@ TEST(RunFloat64Mul) {
m.Return(m.Float64Mul(m.Parameter(0), m.Parameter(1)));
FOR_FLOAT64_INPUTS(i) {
- FOR_FLOAT64_INPUTS(j) { CheckDoubleEq(*i * *j, m.Call(*i, *j)); }
+ FOR_FLOAT64_INPUTS(j) {
+ volatile double expected = *i * *j;
+ CheckDoubleEq(expected, m.Call(*i, *j));
+ }
}
}
@@ -3312,7 +3327,10 @@ TEST(RunFloat64Div) {
m.Return(m.Float64Div(m.Parameter(0), m.Parameter(1)));
FOR_FLOAT64_INPUTS(i) {
- FOR_FLOAT64_INPUTS(j) { CheckDoubleEq(*i / *j, m.Call(*i, *j)); }
+ FOR_FLOAT64_INPUTS(j) {
+ volatile double expected = *i / *j;
+ CheckDoubleEq(expected, m.Call(*i, *j));
+ }
}
}
@@ -3411,7 +3429,10 @@ TEST(RunFloat32SubImm1) {
BufferedRawMachineAssemblerTester<float> m(kMachFloat32);
m.Return(m.Float32Sub(m.Float32Constant(*i), m.Parameter(0)));
- FOR_FLOAT32_INPUTS(j) { CheckFloatEq(*i - *j, m.Call(*j)); }
+ FOR_FLOAT32_INPUTS(j) {
+ volatile float expected = *i - *j;
+ CheckFloatEq(expected, m.Call(*j));
+ }
}
}
@@ -3421,7 +3442,10 @@ TEST(RunFloat32SubImm2) {
BufferedRawMachineAssemblerTester<float> m(kMachFloat32);
m.Return(m.Float32Sub(m.Parameter(0), m.Float32Constant(*i)));
- FOR_FLOAT32_INPUTS(j) { CheckFloatEq(*j - *i, m.Call(*j)); }
+ FOR_FLOAT32_INPUTS(j) {
+ volatile float expected = *j - *i;
+ CheckFloatEq(expected, m.Call(*j));
+ }
}
}
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698