8204335: [ppc] Assembler::add_const_optimized incorrect for some inputs

Reviewed-by: mdoerr, goetz
This commit is contained in:
Volker Simonis 2018-06-08 10:22:26 +02:00
parent 0bc2cae363
commit 414f5b66b8

View File

@ -486,7 +486,7 @@ int Assembler::add_const_optimized(Register d, Register s, long x, Register tmp,
// 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;