changeset 50863:ec70aad8aebe

8204335: [ppc] Assembler::add_const_optimized incorrect for some inputs Reviewed-by: mdoerr, goetz
author simonis
date Fri, 08 Jun 2018 10:22:26 +0200
parents 6ed16c1cafc5
children 3fd625131017
files src/hotspot/cpu/ppc/assembler_ppc.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;