Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8205239 | 11.0.1 | Volker Simonis | P2 | Resolved | Fixed | team |
There's a typo in Assembler::add_const_optimized() which makes it return incorrect results for some input values. The fix is trivial:
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;
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;
- backported by
-
JDK-8205239 [ppc] Assembler::add_const_optimized incorrect for some inputs
- Resolved