8204335: [ppc] Assembler::add_const_optimized incorrect for some inputs
authorsimonis
Fri, 08 Jun 2018 10:22:26 +0200
changeset 50460 ec70aad8aebe
parent 50459 6ed16c1cafc5
child 50461 3fd625131017
8204335: [ppc] Assembler::add_const_optimized incorrect for some inputs Reviewed-by: mdoerr, goetz
src/hotspot/cpu/ppc/assembler_ppc.cpp
--- a/src/hotspot/cpu/ppc/assembler_ppc.cpp	Thu Jun 07 15:08:16 2018 +0200
+++ b/src/hotspot/cpu/ppc/assembler_ppc.cpp	Fri Jun 08 10:22:26 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;