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

Lutz Schmidt lucy at openjdk.java.net
Tue Jul 6 05:55:48 UTC 2021


On Mon, 5 Jul 2021 20:05:29 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:

> 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

Thanks for your clarification! My "prefabricated" opinion blurred the sights on reality. All fine!

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

Marked as reviewed by lucy (Reviewer).

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


More information about the hotspot-compiler-dev mailing list