RFR(XXS): 8204335: [ppc] Assembler::add_const_optimized incorrect for some inputs
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Fri Jun 8 08:22:42 UTC 2018
Hi Volker,
looks good. I will sponsor this for you.
Best regards,
Goetz.
> -----Original Message-----
> From: hotspot-dev [mailto:hotspot-dev-bounces at openjdk.java.net] On
> Behalf Of Volker Simonis
> Sent: Dienstag, 5. Juni 2018 18:06
> To: HotSpot Open Source Developers <hotspot-dev at openjdk.java.net>
> Subject: RFR(XXS): 8204335: [ppc] Assembler::add_const_optimized incorrect
> for some inputs
>
> Hi,
>
> can I please have a review for this trivial, day-one, ppc-only fix:
>
> http://cr.openjdk.java.net/~simonis/webrevs/2018/8204335/
> https://bugs.openjdk.java.net/browse/JDK-8204335
>
> There's a typo in Assembler::add_const_optimized() which makes it
> return incorrect results for some input values. The fix is trivial.
> Repeated here for your convenience:
>
> diff -r 1d476feca3c9 src/hotspot/cpu/ppc/assembler_ppc.cpp
> --- a/src/hotspot/cpu/ppc/assembler_ppc.cpp Mon Jun 04 11:19:54 2018
> +0200
> +++ b/src/hotspot/cpu/ppc/assembler_ppc.cpp Tue Jun 05 11:21:08 2018
> +0200
> @@ -486,7 +486,7 @@
> // Case 2: Can use addis.
> if (xd == 0) {
> short xc = rem & 0xFFFF; // 2nd 16-bit chunk.
> - rem = (rem >> 16) + ((unsigned short)xd >> 15);
> + rem = (rem >> 16) + ((unsigned short)xc >> 15);
> if (rem == 0) {
> addis(d, s, xc);
> return 0;
>
> Thank you and best regards,
> Volker
More information about the hotspot-dev
mailing list