Commit dd31b080 authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: Change the test case for X87 RunFloat64Add and RunFloat64Sub

  The CL #32908 (https://codereview.chromium.org/1526293002) updated the Float64 test data and cause the RunFloat64Add and RunFloat64Sub test cases failed.

  The reason is same as the CL #31808 (issue 1430943002,  X87: Change the test case for X87 float operations), please refer: https://codereview.chromium.org/1430943002/

  Here is the key comments from CL #31808
  Some new test cases use CheckFloatEq(...) and CheckDoubleEq(...) function for result check. When GCC compiling the CheckFloatEq() and CheckDoubleEq() function,
  those inlined functions has different behavior comparing with GCC ia32 build and x87 build.
  The major difference is sse float register still has single precision rounding semantic. While X87 register has no such rounding precsion semantic when directly use register value.
  The V8 turbofan JITTed has exactly same result in both X87 and IA32 port.

  So we add the following sentence to do type case to keep the same precision for RunFloat64Add and RunFloat64Sub.
  Such as: volatile double  expect = *i +/- *j; // *i +/- *j, etc.

BUG=

Review URL: https://codereview.chromium.org/1533593003

Cr-Commit-Position: refs/heads/master@{#32988}
parent cd3054bf
......@@ -3491,7 +3491,10 @@ TEST(RunFloat64Add) {
m.Return(m.Float64Add(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));
}
}
}
......@@ -3502,7 +3505,10 @@ TEST(RunFloat64Sub) {
m.Return(m.Float64Sub(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));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment