OSDN Git Service

Make Math.round consistent on arm64.
authorNicolas Geoffray <ngeoffray@google.com>
Sun, 27 Dec 2015 16:20:14 +0000 (16:20 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Sun, 27 Dec 2015 16:21:40 +0000 (16:21 +0000)
commit40041c9a38e3961d8675d117517719458a115520
treec21af5a5325476518b3c396c309878aabcb67591
parent3de604892a295caf4ffa76809b8028e6d046edd5
Make Math.round consistent on arm64.

OpenJDK seems to have a different rounding implementation than
libcore. Temporarily disable the intrinsic.

Test that fails:
Assert.assertEquals(StrictMath.round(0.49999999999999994d), 1l);
Assert.assertEquals(Math.round(0.49999999999999994d), 1l);

bug:26327751

Change-Id: Iad2fb847e4a553b8c1f5031f772c81e7e4db9f4c
compiler/dex/quick/arm64/fp_arm64.cc
compiler/optimizing/intrinsics_arm64.cc