[jdk17] RFR: 8269879: [PPC64] C2: Math.rint intrinsic uses wrong rounding mode

Martin Doerr mdoerr at openjdk.java.net
Mon Jul 5 20:14:03 UTC 2021


We need to replace the frin and xvrdpi instructions which use a wrong rounding mode. xvrdpic is available with Power7. We can simply switch off RoundDoubleMode intrinsics for older processors (which are outdated).
Note that xvrdpic requires RN=0b00 to use the correct rounding mode. These 2 bits are 0 by default (see "Registers Specified during Process Initialization" in [1]) and are treated as "Limited-Access Bits" (see "2.2.1.2. Limited-Access Bits" in [1] for preservation rules).

[1] "64-Bit ELF V2 ABI Specification" http://cdn.openpowerfoundation.org/wp-content/uploads/resources/leabi/leabi-20170510.pdf

-------------

Commit messages:
 - 8269879: [PPC64] C2: Math.rint intrinsic uses wrong rounding mode

Changes: https://git.openjdk.java.net/jdk17/pull/215/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk17&pr=215&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8269879
  Stats: 7 lines in 3 files changed: 5 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk17/pull/215.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk17 pull/215/head:pull/215

PR: https://git.openjdk.java.net/jdk17/pull/215


More information about the hotspot-compiler-dev mailing list