RFR: 8285868: x86_64 intrinsics for floating point methods isNaN, isFinite and isInfinite [v4]

Jatin Bhateja jbhateja at openjdk.java.net
Wed May 18 06:50:00 UTC 2022


On Wed, 18 May 2022 06:34:34 GMT, Srinivas Vamsi Parasa <duke at openjdk.java.net> wrote:

>> Actually `setb` only writes the byte portion and leaves the remaining of the register intact, so it would be wrong without clearing the register beforehand.
>
> `setb` is producing the correct results and also adding the `xor dst, dst` didn't give any performance improvement. Is it still necessary?

> This partial write may stall later reads on `dst`, you could emit a `xor dst, dst` before doing the comparison.

APIs generate boolean result,  and any reader should only be consuming 8 bit result. Thus its not a scenario for partial register stall from HW perspective,  a narrow write followed by wider read cause a partial register stall due to additional cycles penalty incurred while re-assembling the unmodified bits with modified portion.

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

PR: https://git.openjdk.java.net/jdk/pull/8459


More information about the hotspot-compiler-dev mailing list