Integrated: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics

2023-10-20 Thread Ilya Gavrilin
On Fri, 13 Oct 2023 15:36:56 GMT, Ilya Gavrilin wrote: > Hi all, please review this changes into risc-v floating point copysign and > signum intrinsics. > CopySign - returns first argument with the sign of second. On risc-v we have > `fsgnj.x` instruction, which can implement th

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v6]

2023-10-20 Thread Ilya Gavrilin
return Math.copySign(double81, doubleNegative12) + > Math.copySign(double81, double2) + Math.copySign(double4Dot1, > doubleNegative12); > } > > @Benchmark > public float copySignFloat() { > -return Math.copySign(floatNegative99, float1); > +retur

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v5]

2023-10-19 Thread Ilya Gavrilin
return Math.copySign(double81, doubleNegative12) + > Math.copySign(double81, double2) + Math.copySign(double4Dot1, > doubleNegative12); > } > > @Benchmark > public float copySignFloat() { > -return Math.copySign(floatNegative99, float1); > +retur

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v4]

2023-10-19 Thread Ilya Gavrilin
On Thu, 19 Oct 2023 12:22:29 GMT, Fei Yang wrote: > Still good. You might want to correct the remaining typo. Thanks for review! - PR Comment: https://git.openjdk.org/jdk/pull/16186#issuecomment-1770876188

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v4]

2023-10-19 Thread Ilya Gavrilin
On Thu, 19 Oct 2023 12:14:52 GMT, Ilya Gavrilin wrote: >> Hi all, please review this changes into risc-v floating point copysign and >> signum intrinsics. >> CopySign - returns first argument with the sign of second. On risc-v we have >> `fsgnj.x` instruction,

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v4]

2023-10-19 Thread Ilya Gavrilin
return Math.copySign(double81, doubleNegative12) + > Math.copySign(double81, double2) + Math.copySign(double4Dot1, > doubleNegative12); > } > > @Benchmark > public float copySignFloat() { > -return Math.copySign(floatNegative99, float1); > +retur

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v3]

2023-10-18 Thread Ilya Gavrilin
return Math.copySign(double81, doubleNegative12) + > Math.copySign(double81, double2) + Math.copySign(double4Dot1, > doubleNegative12); > } > > @Benchmark > public float copySignFloat() { > -return Math.copySign(floatNegative99, float1); > +retur

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v2]

2023-10-17 Thread Ilya Gavrilin
On Tue, 17 Oct 2023 09:09:52 GMT, Fei Yang wrote: >> Ilya Gavrilin has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix some registers usages and typos > > src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp l

Re: RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics [v2]

2023-10-16 Thread Ilya Gavrilin
return Math.copySign(double81, doubleNegative12) + > Math.copySign(double81, double2) + Math.copySign(double4Dot1, > doubleNegative12); > } > > @Benchmark > public float copySignFloat() { > -return Math.copySign(floatNegative99, float1); > +retur

RFR: 8317971: RISC-V: implement copySignF/D and signumF/D intrinsics

2023-10-13 Thread Ilya Gavrilin
Hi all, please review this changes into risc-v floating point copysign and signum intrinsics. CopySign - returns first argument with the sign of second. On risc-v we have `fsgnj.x` instruction, which can implement this intrinsic. Signum - returns input value if it is +/- 0.0 or NaN, otherwise 1.0