Mercurial > hg > icedtea8
changeset 2815:ee01e30e18f9 icedtea-3.8.0pre01
Bump aarch32 to jdk8u162-b12-aarch32-180220.
Upstream changes:
- S6651256: jstack: DeleteGlobalRef method call doesn't lead to descreasing of global refs count shown by jstack
- S6656031: SA: jmap -permstat number of classes is off by 1
- S8023667: SA: ExceptionBlob and other C2 classes not available in client VM
- S8072428: Enable UseLoopCounter ergonomically if on-stack-replacement is enabled
- S8073670: TypeF::eq and TypeD::eq do not handle NaNs correctly
- S8087291: InitialBootClassLoaderMetaspaceSize and CompressedClassSpaceSize should be checked consistent from MaxMetaspaceSize
- S8145913: PPC64: add Montgomery multiply intrinsic
- S8148786: xml.tranform fails on x86-64
- S8161598: Kitchensink fails: assert(nm->insts_contains(original_pc)) failed: original PC must be in nmethod/CompiledMethod
- S8164954: split_if creates empty phi and region nodes
- S8166742: SIGFPE in C2 Loop IV elimination
- S8168318: PPC64: Use cmpldi instead of li/cmpld
- S8170328: PPC64: Use andis instead of lis/and
- S8172751: OSR compilation at unreachable bci causes C1 crash
- S8175340: Possible invalid memory accesses due to ciMethodData::bci_to_data() returning NULL
- S8177026: jvm.dll file version not updated since 8u72
- S8177958: Possible uninitialized char* in vm_version_solaris_sparc.cpp
- S8178047: Aliasing problem with raw memory accesses
- S8178536: OOM ERRORS + SERVICE-THREAD TAKES A PROCESSOR TO 100%
- S8180855: Null pointer dereference in OopMapSet::all_do of oopMap.cpp:394
- S8181055: PPC64: "mbind: Invalid argument" still seen after 8175813
- S8181810: PPC64: Leverage extrdi for bitfield extract
- S8184009: Missing null pointer check in InterpreterRuntime::update_mdp_for_ret()
- S8184271: Time related C1 intrinsics produce inconsistent results when floating around
- S8185164: GetOwnedMonitorInfo() returns incorrect owned monitor
- S8185572: Enable AssumeMP by default on SPARC machines
ChangeLog:
2018-03-22 Andrew John Hughes <gnu_andrew@member.fsf.org>
Bump aarch32 to jdk8u162-b12-aarch32-180220.
* patches/hotspot/aarch32/8145913-pr3466-rh1498309.patch,
* patches/hotspot/aarch32/8168318-pr3466-rh1498320.patch,
* patches/hotspot/aarch32/8170328-pr3466-rh1498321.patch,
* patches/hotspot/aarch32/8181055-pr3394-rh1448880.patch,
* patches/hotspot/aarch32/8181810-pr3466-rh1498319.patch,
* patches/hotspot/aarch32/8185164-pr3438.patch:
Remove as applied upstream.
* Makefile.am:
(ICEDTEA_PATCHES): Remove unneeded AArch32-only patches
now that port is on 8u162 like the others.
* hotspot.map.in: Bump aarch32 to
jdk8u162-b12-aarch32-180220.
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Fri, 23 Mar 2018 19:12:33 +0000 |
parents | 379b335f8d59 |
children | ea256781cd8a |
files | ChangeLog Makefile.am hotspot.map.in patches/hotspot/aarch32/8145913-pr3466-rh1498309.patch patches/hotspot/aarch32/8168318-pr3466-rh1498320.patch patches/hotspot/aarch32/8170328-pr3466-rh1498321.patch patches/hotspot/aarch32/8181055-pr3394-rh1448880.patch patches/hotspot/aarch32/8181810-pr3466-rh1498319.patch patches/hotspot/aarch32/8185164-pr3438.patch |
diffstat | 9 files changed, 20 insertions(+), 748 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Mar 23 04:41:00 2018 +0000 +++ b/ChangeLog Fri Mar 23 19:12:33 2018 +0000 @@ -1,3 +1,19 @@ +2018-03-22 Andrew John Hughes <gnu_andrew@member.fsf.org> + + Bump aarch32 to jdk8u162-b12-aarch32-180220. + * patches/hotspot/aarch32/8145913-pr3466-rh1498309.patch, + * patches/hotspot/aarch32/8168318-pr3466-rh1498320.patch, + * patches/hotspot/aarch32/8170328-pr3466-rh1498321.patch, + * patches/hotspot/aarch32/8181055-pr3394-rh1448880.patch, + * patches/hotspot/aarch32/8181810-pr3466-rh1498319.patch, + * patches/hotspot/aarch32/8185164-pr3438.patch: + Remove as applied upstream. + * Makefile.am: + (ICEDTEA_PATCHES): Remove unneeded AArch32-only patches + now that port is on 8u162 like the others. + * hotspot.map.in: Bump aarch32 to + jdk8u162-b12-aarch32-180220. + 2018-03-21 Andrew John Hughes <gnu_andrew@member.fsf.org> Bump shenandoah to aarch64-shenandoah-jdk8u162-b12.
--- a/Makefile.am Fri Mar 23 04:41:00 2018 +0000 +++ b/Makefile.am Fri Mar 23 19:12:33 2018 +0000 @@ -348,15 +348,9 @@ if WITH_ALT_HSBUILD # Patches only for AArch32 -if WITH_AARCH32_HSBUILD -ICEDTEA_PATCHES += \ - patches/hotspot/$(HSBUILD)/8145913-pr3466-rh1498309.patch \ - patches/hotspot/$(HSBUILD)/8168318-pr3466-rh1498320.patch \ - patches/hotspot/$(HSBUILD)/8170328-pr3466-rh1498321.patch \ - patches/hotspot/$(HSBUILD)/8181055-pr3394-rh1448880.patch \ - patches/hotspot/$(HSBUILD)/8181810-pr3466-rh1498319.patch \ - patches/hotspot/$(HSBUILD)/8185164-pr3438.patch -endif +#if WITH_AARCH32_HSBUILD +#ICEDTEA_PATCHES += \ +#endif ICEDTEA_PATCHES += \ patches/hotspot/$(HSBUILD)/8038392-rh1064383.patch \
--- a/hotspot.map.in Fri Mar 23 04:41:00 2018 +0000 +++ b/hotspot.map.in Fri Mar 23 19:12:33 2018 +0000 @@ -1,4 +1,4 @@ # version type(drop/hg) url changeset sha256sum default drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 839becd2cb2f 7a618e44d5e3adb86dde7a0c5e9f433830bfeb4bb4d18d2c218518662144b64e shenandoah drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ fb1e2ca56e94 1174f22b774498793388e431a424c99ee56812b1e37d83563b621ecbf7bab4c0 -aarch32 drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 1cd346521065 cffb0aab12c97f610cd546c0f4568ffe0dd80ba47537831268f403527f9968f1 +aarch32 drop http://icedtea.classpath.org/download/drops/icedtea8/@ICEDTEA_RELEASE@ 2dc629cf3ecc f859ccb9bc4bec903ee7a742f05006c8b0e80bcc01a5c4f04336d3abf2f7c91a
--- a/patches/hotspot/aarch32/8145913-pr3466-rh1498309.patch Fri Mar 23 04:41:00 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,471 +0,0 @@ -# HG changeset patch -# User mdoerr -# Date 1507750779 -3600 -# Wed Oct 11 20:39:39 2017 +0100 -# Node ID 92f0dbe76a13992cc27188e0f68e4b1771c7004a -# Parent 542c122b1d7d30c29189565248074aa28f21ae58 -8145913, PR3466, RH1498309: PPC64: add Montgomery multiply intrinsic -Reviewed-by: aph, goetz - -diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp ---- openjdk.orig/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp 2018-03-21 23:06:58.009158377 +0000 -@@ -1180,6 +1180,8 @@ - inline void mullw_( Register d, Register a, Register b); - inline void mulhw( Register d, Register a, Register b); - inline void mulhw_( Register d, Register a, Register b); -+ inline void mulhwu( Register d, Register a, Register b); -+ inline void mulhwu_(Register d, Register a, Register b); - inline void mulhd( Register d, Register a, Register b); - inline void mulhd_( Register d, Register a, Register b); - inline void mulhdu( Register d, Register a, Register b); -diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp ---- openjdk.orig/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/assembler_ppc.inline.hpp 2018-03-21 23:06:58.009158377 +0000 -@@ -109,6 +109,8 @@ - inline void Assembler::mullw_( Register d, Register a, Register b) { emit_int32(MULLW_OPCODE | rt(d) | ra(a) | rb(b) | oe(0) | rc(1)); } - inline void Assembler::mulhw( Register d, Register a, Register b) { emit_int32(MULHW_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } - inline void Assembler::mulhw_( Register d, Register a, Register b) { emit_int32(MULHW_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); } -+inline void Assembler::mulhwu( Register d, Register a, Register b) { emit_int32(MULHWU_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } -+inline void Assembler::mulhwu_(Register d, Register a, Register b) { emit_int32(MULHWU_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); } - inline void Assembler::mulhd( Register d, Register a, Register b) { emit_int32(MULHD_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } - inline void Assembler::mulhd_( Register d, Register a, Register b) { emit_int32(MULHD_OPCODE | rt(d) | ra(a) | rb(b) | rc(1)); } - inline void Assembler::mulhdu( Register d, Register a, Register b) { emit_int32(MULHDU_OPCODE | rt(d) | ra(a) | rb(b) | rc(0)); } -diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/c2_init_ppc.cpp openjdk/hotspot/src/cpu/ppc/vm/c2_init_ppc.cpp ---- openjdk.orig/hotspot/src/cpu/ppc/vm/c2_init_ppc.cpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/c2_init_ppc.cpp 2018-03-21 23:06:58.009158377 +0000 -@@ -45,4 +45,10 @@ - FLAG_SET_ERGO(bool, InsertEndGroupPPC64, true); - } - } -+ -+ if (OptimizeFill) { -+ warning("OptimizeFill is not supported on this CPU."); -+ FLAG_SET_DEFAULT(OptimizeFill, false); -+ } -+ - } -diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp openjdk/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp ---- openjdk.orig/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/sharedRuntime_ppc.cpp 2018-03-21 23:06:58.009158377 +0000 -@@ -42,6 +42,8 @@ - #include "opto/runtime.hpp" - #endif - -+#include <alloca.h> -+ - #define __ masm-> - - #ifdef PRODUCT -@@ -3268,3 +3270,245 @@ - return RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_in_bytes/wordSize, - oop_maps, true); - } -+ -+ -+//------------------------------Montgomery multiplication------------------------ -+// -+ -+// Subtract 0:b from carry:a. Return carry. -+static unsigned long -+sub(unsigned long a[], unsigned long b[], unsigned long carry, long len) { -+ long i = 0; -+ unsigned long tmp, tmp2; -+ __asm__ __volatile__ ( -+ "subfc %[tmp], %[tmp], %[tmp] \n" // pre-set CA -+ "mtctr %[len] \n" -+ "0: \n" -+ "ldx %[tmp], %[i], %[a] \n" -+ "ldx %[tmp2], %[i], %[b] \n" -+ "subfe %[tmp], %[tmp2], %[tmp] \n" // subtract extended -+ "stdx %[tmp], %[i], %[a] \n" -+ "addi %[i], %[i], 8 \n" -+ "bdnz 0b \n" -+ "addme %[tmp], %[carry] \n" // carry + CA - 1 -+ : [i]"+b"(i), [tmp]"=&r"(tmp), [tmp2]"=&r"(tmp2) -+ : [a]"r"(a), [b]"r"(b), [carry]"r"(carry), [len]"r"(len) -+ : "ctr", "xer", "memory" -+ ); -+ return tmp; -+} -+ -+// Multiply (unsigned) Long A by Long B, accumulating the double- -+// length result into the accumulator formed of T0, T1, and T2. -+inline void MACC(unsigned long A, unsigned long B, unsigned long &T0, unsigned long &T1, unsigned long &T2) { -+ unsigned long hi, lo; -+ __asm__ __volatile__ ( -+ "mulld %[lo], %[A], %[B] \n" -+ "mulhdu %[hi], %[A], %[B] \n" -+ "addc %[T0], %[T0], %[lo] \n" -+ "adde %[T1], %[T1], %[hi] \n" -+ "addze %[T2], %[T2] \n" -+ : [hi]"=&r"(hi), [lo]"=&r"(lo), [T0]"+r"(T0), [T1]"+r"(T1), [T2]"+r"(T2) -+ : [A]"r"(A), [B]"r"(B) -+ : "xer" -+ ); -+} -+ -+// As above, but add twice the double-length result into the -+// accumulator. -+inline void MACC2(unsigned long A, unsigned long B, unsigned long &T0, unsigned long &T1, unsigned long &T2) { -+ unsigned long hi, lo; -+ __asm__ __volatile__ ( -+ "mulld %[lo], %[A], %[B] \n" -+ "mulhdu %[hi], %[A], %[B] \n" -+ "addc %[T0], %[T0], %[lo] \n" -+ "adde %[T1], %[T1], %[hi] \n" -+ "addze %[T2], %[T2] \n" -+ "addc %[T0], %[T0], %[lo] \n" -+ "adde %[T1], %[T1], %[hi] \n" -+ "addze %[T2], %[T2] \n" -+ : [hi]"=&r"(hi), [lo]"=&r"(lo), [T0]"+r"(T0), [T1]"+r"(T1), [T2]"+r"(T2) -+ : [A]"r"(A), [B]"r"(B) -+ : "xer" -+ ); -+} -+ -+// Fast Montgomery multiplication. The derivation of the algorithm is -+// in "A Cryptographic Library for the Motorola DSP56000, -+// Dusse and Kaliski, Proc. EUROCRYPT 90, pp. 230-237". -+static void -+montgomery_multiply(unsigned long a[], unsigned long b[], unsigned long n[], -+ unsigned long m[], unsigned long inv, int len) { -+ unsigned long t0 = 0, t1 = 0, t2 = 0; // Triple-precision accumulator -+ int i; -+ -+ assert(inv * n[0] == -1UL, "broken inverse in Montgomery multiply"); -+ -+ for (i = 0; i < len; i++) { -+ int j; -+ for (j = 0; j < i; j++) { -+ MACC(a[j], b[i-j], t0, t1, t2); -+ MACC(m[j], n[i-j], t0, t1, t2); -+ } -+ MACC(a[i], b[0], t0, t1, t2); -+ m[i] = t0 * inv; -+ MACC(m[i], n[0], t0, t1, t2); -+ -+ assert(t0 == 0, "broken Montgomery multiply"); -+ -+ t0 = t1; t1 = t2; t2 = 0; -+ } -+ -+ for (i = len; i < 2*len; i++) { -+ int j; -+ for (j = i-len+1; j < len; j++) { -+ MACC(a[j], b[i-j], t0, t1, t2); -+ MACC(m[j], n[i-j], t0, t1, t2); -+ } -+ m[i-len] = t0; -+ t0 = t1; t1 = t2; t2 = 0; -+ } -+ -+ while (t0) { -+ t0 = sub(m, n, t0, len); -+ } -+} -+ -+// Fast Montgomery squaring. This uses asymptotically 25% fewer -+// multiplies so it should be up to 25% faster than Montgomery -+// multiplication. However, its loop control is more complex and it -+// may actually run slower on some machines. -+static void -+montgomery_square(unsigned long a[], unsigned long n[], -+ unsigned long m[], unsigned long inv, int len) { -+ unsigned long t0 = 0, t1 = 0, t2 = 0; // Triple-precision accumulator -+ int i; -+ -+ assert(inv * n[0] == -1UL, "broken inverse in Montgomery multiply"); -+ -+ for (i = 0; i < len; i++) { -+ int j; -+ int end = (i+1)/2; -+ for (j = 0; j < end; j++) { -+ MACC2(a[j], a[i-j], t0, t1, t2); -+ MACC(m[j], n[i-j], t0, t1, t2); -+ } -+ if ((i & 1) == 0) { -+ MACC(a[j], a[j], t0, t1, t2); -+ } -+ for (; j < i; j++) { -+ MACC(m[j], n[i-j], t0, t1, t2); -+ } -+ m[i] = t0 * inv; -+ MACC(m[i], n[0], t0, t1, t2); -+ -+ assert(t0 == 0, "broken Montgomery square"); -+ -+ t0 = t1; t1 = t2; t2 = 0; -+ } -+ -+ for (i = len; i < 2*len; i++) { -+ int start = i-len+1; -+ int end = start + (len - start)/2; -+ int j; -+ for (j = start; j < end; j++) { -+ MACC2(a[j], a[i-j], t0, t1, t2); -+ MACC(m[j], n[i-j], t0, t1, t2); -+ } -+ if ((i & 1) == 0) { -+ MACC(a[j], a[j], t0, t1, t2); -+ } -+ for (; j < len; j++) { -+ MACC(m[j], n[i-j], t0, t1, t2); -+ } -+ m[i-len] = t0; -+ t0 = t1; t1 = t2; t2 = 0; -+ } -+ -+ while (t0) { -+ t0 = sub(m, n, t0, len); -+ } -+} -+ -+// The threshold at which squaring is advantageous was determined -+// experimentally on an i7-3930K (Ivy Bridge) CPU @ 3.5GHz. -+// Doesn't seem to be relevant for Power8 so we use the same value. -+#define MONTGOMERY_SQUARING_THRESHOLD 64 -+ -+// Copy len longwords from s to d, word-swapping as we go. The -+// destination array is reversed. -+static void reverse_words(unsigned long *s, unsigned long *d, int len) { -+ d += len; -+ while(len-- > 0) { -+ d--; -+ unsigned long s_val = *s; -+ // Swap words in a longword on little endian machines. -+#ifdef VM_LITTLE_ENDIAN -+ s_val = (s_val << 32) | (s_val >> 32); -+#endif -+ *d = s_val; -+ s++; -+ } -+} -+ -+void SharedRuntime::montgomery_multiply(jint *a_ints, jint *b_ints, jint *n_ints, -+ jint len, jlong inv, -+ jint *m_ints) { -+ assert(len % 2 == 0, "array length in montgomery_multiply must be even"); -+ int longwords = len/2; -+ assert(longwords > 0, "unsupported"); -+ -+ // Make very sure we don't use so much space that the stack might -+ // overflow. 512 jints corresponds to an 16384-bit integer and -+ // will use here a total of 8k bytes of stack space. -+ int total_allocation = longwords * sizeof (unsigned long) * 4; -+ guarantee(total_allocation <= 8192, "must be"); -+ unsigned long *scratch = (unsigned long *)alloca(total_allocation); -+ -+ // Local scratch arrays -+ unsigned long -+ *a = scratch + 0 * longwords, -+ *b = scratch + 1 * longwords, -+ *n = scratch + 2 * longwords, -+ *m = scratch + 3 * longwords; -+ -+ reverse_words((unsigned long *)a_ints, a, longwords); -+ reverse_words((unsigned long *)b_ints, b, longwords); -+ reverse_words((unsigned long *)n_ints, n, longwords); -+ -+ ::montgomery_multiply(a, b, n, m, (unsigned long)inv, longwords); -+ -+ reverse_words(m, (unsigned long *)m_ints, longwords); -+} -+ -+void SharedRuntime::montgomery_square(jint *a_ints, jint *n_ints, -+ jint len, jlong inv, -+ jint *m_ints) { -+ assert(len % 2 == 0, "array length in montgomery_square must be even"); -+ int longwords = len/2; -+ assert(longwords > 0, "unsupported"); -+ -+ // Make very sure we don't use so much space that the stack might -+ // overflow. 512 jints corresponds to an 16384-bit integer and -+ // will use here a total of 6k bytes of stack space. -+ int total_allocation = longwords * sizeof (unsigned long) * 3; -+ guarantee(total_allocation <= 8192, "must be"); -+ unsigned long *scratch = (unsigned long *)alloca(total_allocation); -+ -+ // Local scratch arrays -+ unsigned long -+ *a = scratch + 0 * longwords, -+ *n = scratch + 1 * longwords, -+ *m = scratch + 2 * longwords; -+ -+ reverse_words((unsigned long *)a_ints, a, longwords); -+ reverse_words((unsigned long *)n_ints, n, longwords); -+ -+ if (len >= MONTGOMERY_SQUARING_THRESHOLD) { -+ ::montgomery_square(a, n, m, (unsigned long)inv, longwords); -+ } else { -+ ::montgomery_multiply(a, a, n, m, (unsigned long)inv, longwords); -+ } -+ -+ reverse_words(m, (unsigned long *)m_ints, longwords); -+} -diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp openjdk/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp ---- openjdk.orig/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp 2018-03-21 23:06:58.009158377 +0000 -@@ -2524,6 +2524,14 @@ - StubRoutines::_aescrypt_decryptBlock = generate_aescrypt_decryptBlock(); - } - -+ if (UseMontgomeryMultiplyIntrinsic) { -+ StubRoutines::_montgomeryMultiply -+ = CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_multiply); -+ } -+ if (UseMontgomerySquareIntrinsic) { -+ StubRoutines::_montgomerySquare -+ = CAST_FROM_FN_PTR(address, SharedRuntime::montgomery_square); -+ } - } - - public: -diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp openjdk/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp ---- openjdk.orig/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/templateInterpreter_ppc.cpp 2018-03-21 23:06:58.013158313 +0000 -@@ -265,7 +265,7 @@ - __ cmpdi(CCR0, Rmdo, 0); - __ beq(CCR0, no_mdo); - -- // Increment backedge counter in the MDO. -+ // Increment invocation counter in the MDO. - const int mdo_bc_offs = in_bytes(MethodData::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset()); - __ lwz(Rscratch2, mdo_bc_offs, Rmdo); - __ addi(Rscratch2, Rscratch2, increment); -@@ -277,12 +277,12 @@ - } - - // Increment counter in MethodCounters*. -- const int mo_bc_offs = in_bytes(MethodCounters::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset()); -+ const int mo_ic_offs = in_bytes(MethodCounters::invocation_counter_offset()) + in_bytes(InvocationCounter::counter_offset()); - __ bind(no_mdo); - __ get_method_counters(R19_method, R3_counters, done); -- __ lwz(Rscratch2, mo_bc_offs, R3_counters); -+ __ lwz(Rscratch2, mo_ic_offs, R3_counters); - __ addi(Rscratch2, Rscratch2, increment); -- __ stw(Rscratch2, mo_bc_offs, R3_counters); -+ __ stw(Rscratch2, mo_ic_offs, R3_counters); - __ load_const_optimized(Rscratch1, mask, R0); - __ and_(Rscratch1, Rscratch2, Rscratch1); - __ beq(CCR0, *overflow); -diff -Nru openjdk.orig/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp ---- openjdk.orig/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/cpu/ppc/vm/vm_version_ppc.cpp 2018-03-21 23:07:51.520302868 +0000 -@@ -201,6 +201,12 @@ - FLAG_SET_DEFAULT(UseSHA512Intrinsics, false); - } - -+ if (FLAG_IS_DEFAULT(UseMontgomeryMultiplyIntrinsic)) { -+ UseMontgomeryMultiplyIntrinsic = true; -+ } -+ if (FLAG_IS_DEFAULT(UseMontgomerySquareIntrinsic)) { -+ UseMontgomerySquareIntrinsic = true; -+ } - } - - void VM_Version::print_features() { -diff -Nru openjdk.orig/hotspot/src/share/vm/opto/library_call.cpp openjdk/hotspot/src/share/vm/opto/library_call.cpp ---- openjdk.orig/hotspot/src/share/vm/opto/library_call.cpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/opto/library_call.cpp 2018-03-21 23:06:58.013158313 +0000 -@@ -6068,11 +6068,21 @@ - Node* n_start = array_element_address(n, intcon(0), n_elem); - Node* m_start = array_element_address(m, intcon(0), m_elem); - -- Node* call = make_runtime_call(RC_LEAF, -- OptoRuntime::montgomeryMultiply_Type(), -- stubAddr, stubName, TypePtr::BOTTOM, -- a_start, b_start, n_start, len, inv, top(), -- m_start); -+ Node* call = NULL; -+ if (CCallingConventionRequiresIntsAsLongs) { -+ Node* len_I2L = ConvI2L(len); -+ call = make_runtime_call(RC_LEAF, -+ OptoRuntime::montgomeryMultiply_Type(), -+ stubAddr, stubName, TypePtr::BOTTOM, -+ a_start, b_start, n_start, len_I2L XTOP, inv, -+ top(), m_start); -+ } else { -+ call = make_runtime_call(RC_LEAF, -+ OptoRuntime::montgomeryMultiply_Type(), -+ stubAddr, stubName, TypePtr::BOTTOM, -+ a_start, b_start, n_start, len, inv, top(), -+ m_start); -+ } - set_result(m); - } - -@@ -6122,11 +6132,22 @@ - Node* n_start = array_element_address(n, intcon(0), n_elem); - Node* m_start = array_element_address(m, intcon(0), m_elem); - -- Node* call = make_runtime_call(RC_LEAF, -- OptoRuntime::montgomerySquare_Type(), -- stubAddr, stubName, TypePtr::BOTTOM, -- a_start, n_start, len, inv, top(), -- m_start); -+ Node* call = NULL; -+ if (CCallingConventionRequiresIntsAsLongs) { -+ Node* len_I2L = ConvI2L(len); -+ call = make_runtime_call(RC_LEAF, -+ OptoRuntime::montgomerySquare_Type(), -+ stubAddr, stubName, TypePtr::BOTTOM, -+ a_start, n_start, len_I2L XTOP, inv, top(), -+ m_start); -+ } else { -+ call = make_runtime_call(RC_LEAF, -+ OptoRuntime::montgomerySquare_Type(), -+ stubAddr, stubName, TypePtr::BOTTOM, -+ a_start, n_start, len, inv, top(), -+ m_start); -+ } -+ - set_result(m); - } - -diff -Nru openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp openjdk/hotspot/src/share/vm/opto/runtime.cpp ---- openjdk.orig/hotspot/src/share/vm/opto/runtime.cpp 2018-02-20 10:39:15.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/opto/runtime.cpp 2018-03-21 23:06:58.013158313 +0000 -@@ -1005,12 +1005,20 @@ - // create input type (domain) - int num_args = 7; - int argcnt = num_args; -+ if (CCallingConventionRequiresIntsAsLongs) { -+ argcnt++; // additional placeholder -+ } - const Type** fields = TypeTuple::fields(argcnt); - int argp = TypeFunc::Parms; - fields[argp++] = TypePtr::NOTNULL; // a - fields[argp++] = TypePtr::NOTNULL; // b - fields[argp++] = TypePtr::NOTNULL; // n -- fields[argp++] = TypeInt::INT; // len -+ if (CCallingConventionRequiresIntsAsLongs) { -+ fields[argp++] = TypeLong::LONG; // len -+ fields[argp++] = TypeLong::HALF; // placeholder -+ } else { -+ fields[argp++] = TypeInt::INT; // len -+ } - fields[argp++] = TypeLong::LONG; // inv - fields[argp++] = Type::HALF; - fields[argp++] = TypePtr::NOTNULL; // result -@@ -1029,11 +1037,19 @@ - // create input type (domain) - int num_args = 6; - int argcnt = num_args; -+ if (CCallingConventionRequiresIntsAsLongs) { -+ argcnt++; // additional placeholder -+ } - const Type** fields = TypeTuple::fields(argcnt); - int argp = TypeFunc::Parms; - fields[argp++] = TypePtr::NOTNULL; // a - fields[argp++] = TypePtr::NOTNULL; // n -- fields[argp++] = TypeInt::INT; // len -+ if (CCallingConventionRequiresIntsAsLongs) { -+ fields[argp++] = TypeLong::LONG; // len -+ fields[argp++] = TypeLong::HALF; // placeholder -+ } else { -+ fields[argp++] = TypeInt::INT; // len -+ } - fields[argp++] = TypeLong::LONG; // inv - fields[argp++] = Type::HALF; - fields[argp++] = TypePtr::NOTNULL; // result
--- a/patches/hotspot/aarch32/8168318-pr3466-rh1498320.patch Fri Mar 23 04:41:00 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -# HG changeset patch -# User goetz -# Date 1477563748 -7200 -# Thu Oct 27 12:22:28 2016 +0200 -# Node ID 9b9d9e11c04d5e5f64829d34752e5c94b1c7d911 -# Parent 92f0dbe76a13992cc27188e0f68e4b1771c7004a -8168318, PR3466, RH1498320: PPC64: Use cmpldi instead of li/cmpld -Reviewed-by: goetz -Contributed-by: igor.nunes@eldorado.org.br - -diff --git a/src/cpu/ppc/vm/ppc.ad b/src/cpu/ppc/vm/ppc.ad ---- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad -+++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad -@@ -10571,6 +10571,17 @@ - ins_pipe(pipe_class_compare); - %} - -+instruct cmpP_reg_null(flagsReg crx, iRegP_N2P src1, immP_0or1 src2) %{ -+ match(Set crx (CmpP src1 src2)); -+ format %{ "CMPLDI $crx, $src1, $src2 \t// ptr" %} -+ size(4); -+ ins_encode %{ -+ // TODO: PPC port $archOpcode(ppc64Opcode_cmpl); -+ __ cmpldi($crx$$CondRegister, $src1$$Register, (int)((short)($src2$$constant & 0xFFFF))); -+ %} -+ ins_pipe(pipe_class_compare); -+%} -+ - // Used in postalloc expand. - instruct cmpP_reg_imm16(flagsReg crx, iRegPsrc src1, immL16 src2) %{ - // This match rule prevents reordering of node before a safepoint.
--- a/patches/hotspot/aarch32/8170328-pr3466-rh1498321.patch Fri Mar 23 04:41:00 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -# HG changeset patch -# User mdoerr -# Date 1480079712 7200 -# Fri Nov 25 11:15:12 2016 -0200 -# Node ID 3c499a0ba92b1affb3f473c6502e374f4785aba9 -# Parent 9b9d9e11c04d5e5f64829d34752e5c94b1c7d911 -8170328, PR3466, RH1498321: PPC64: Use andis instead of lis/and -Reviewed-by: goetz, mdoerr -Contributed-by: Igor Nunes <igor.nunes@eldorado.org.br> - -diff --git a/src/cpu/ppc/vm/ppc.ad b/src/cpu/ppc/vm/ppc.ad ---- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad -+++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad -@@ -8889,6 +8889,19 @@ - ins_pipe(pipe_class_default); - %} - -+// Left shifted Immediate And -+instruct andI_reg_immIhi16(iRegIdst dst, iRegIsrc src1, immIhi16 src2, flagsRegCR0 cr0) %{ -+ match(Set dst (AndI src1 src2)); -+ effect(KILL cr0); -+ format %{ "ANDIS $dst, $src1, $src2.hi" %} -+ size(4); -+ ins_encode %{ -+ // TODO: PPC port $archOpcode(ppc64Opcode_andis_); -+ __ andis_($dst$$Register, $src1$$Register, (int)((unsigned short)(($src2$$constant & 0xFFFF0000) >> 16))); -+ %} -+ ins_pipe(pipe_class_default); -+%} -+ - // Immediate And - instruct andI_reg_uimm16(iRegIdst dst, iRegIsrc src1, uimmI16 src2, flagsRegCR0 cr0) %{ - match(Set dst (AndI src1 src2));
--- a/patches/hotspot/aarch32/8181055-pr3394-rh1448880.patch Fri Mar 23 04:41:00 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -# HG changeset patch -# User zgu -# Date 1499204074 -3600 -# Tue Jul 04 22:34:34 2017 +0100 -# Node ID 13a04e8df5a3af73794146b930b32556c7cbc5b0 -# Parent 4dc64f3c3e2342970f091a1a73165a3e2a0c2f88 -8181055, PR3394, RH1448880: PPC64: "mbind: Invalid argument" still seen after 8175813 -Summary: Use numa_interleave_memory v2 api when available -Reviewed-by: dholmes, shade, gromero - -diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2018-01-22 17:40:29.680271971 +0000 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2018-01-22 17:41:32.607262105 +0000 -@@ -2827,11 +2827,8 @@ - extern "C" JNIEXPORT void numa_error(char *where) { } - extern "C" JNIEXPORT int fork1() { return fork(); } - -- --// If we are running with libnuma version > 2, then we should --// be trying to use symbols with versions 1.1 --// If we are running with earlier version, which did not have symbol versions, --// we should use the base version. -+// Handle request to load libnuma symbol version 1.1 (API v1). If it fails -+// load symbol from base version instead. - void* os::Linux::libnuma_dlsym(void* handle, const char *name) { - #ifndef __UCLIBC__ - void *f = dlvsym(handle, name, "libnuma_1.1"); -@@ -2844,6 +2841,12 @@ - #endif - } - -+// Handle request to load libnuma symbol version 1.2 (API v2) only. -+// Return NULL if the symbol is not defined in this particular version. -+void* os::Linux::libnuma_v2_dlsym(void* handle, const char* name) { -+ return dlvsym(handle, name, "libnuma_1.2"); -+} -+ - bool os::Linux::libnuma_init() { - // sched_getcpu() should be in libc. - set_sched_getcpu(CAST_TO_FN_PTR(sched_getcpu_func_t, -@@ -2868,6 +2871,8 @@ - libnuma_dlsym(handle, "numa_tonode_memory"))); - set_numa_interleave_memory(CAST_TO_FN_PTR(numa_interleave_memory_func_t, - libnuma_dlsym(handle, "numa_interleave_memory"))); -+ set_numa_interleave_memory_v2(CAST_TO_FN_PTR(numa_interleave_memory_v2_func_t, -+ libnuma_v2_dlsym(handle, "numa_interleave_memory"))); - set_numa_set_bind_policy(CAST_TO_FN_PTR(numa_set_bind_policy_func_t, - libnuma_dlsym(handle, "numa_set_bind_policy"))); - set_numa_bitmask_isbitset(CAST_TO_FN_PTR(numa_bitmask_isbitset_func_t, -@@ -2987,6 +2992,7 @@ - os::Linux::numa_available_func_t os::Linux::_numa_available; - os::Linux::numa_tonode_memory_func_t os::Linux::_numa_tonode_memory; - os::Linux::numa_interleave_memory_func_t os::Linux::_numa_interleave_memory; -+os::Linux::numa_interleave_memory_v2_func_t os::Linux::_numa_interleave_memory_v2; - os::Linux::numa_set_bind_policy_func_t os::Linux::_numa_set_bind_policy; - os::Linux::numa_bitmask_isbitset_func_t os::Linux::_numa_bitmask_isbitset; - os::Linux::numa_distance_func_t os::Linux::_numa_distance; -diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp openjdk/hotspot/src/os/linux/vm/os_linux.hpp ---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp 2018-01-22 17:40:29.448275695 +0000 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp 2018-01-22 17:40:55.547856843 +0000 -@@ -192,6 +192,8 @@ - static void libpthread_init(); - static bool libnuma_init(); - static void* libnuma_dlsym(void* handle, const char* name); -+ // libnuma v2 (libnuma_1.2) symbols -+ static void* libnuma_v2_dlsym(void* handle, const char* name); - // Minimum stack size a thread can be created with (allowing - // the VM to completely create the thread and enter user code) - static size_t min_stack_allowed; -@@ -252,6 +254,8 @@ - typedef int (*numa_available_func_t)(void); - typedef int (*numa_tonode_memory_func_t)(void *start, size_t size, int node); - typedef void (*numa_interleave_memory_func_t)(void *start, size_t size, unsigned long *nodemask); -+ typedef void (*numa_interleave_memory_v2_func_t)(void *start, size_t size, struct bitmask* mask); -+ - typedef void (*numa_set_bind_policy_func_t)(int policy); - typedef int (*numa_bitmask_isbitset_func_t)(struct bitmask *bmp, unsigned int n); - typedef int (*numa_distance_func_t)(int node1, int node2); -@@ -263,6 +267,7 @@ - static numa_available_func_t _numa_available; - static numa_tonode_memory_func_t _numa_tonode_memory; - static numa_interleave_memory_func_t _numa_interleave_memory; -+ static numa_interleave_memory_v2_func_t _numa_interleave_memory_v2; - static numa_set_bind_policy_func_t _numa_set_bind_policy; - static numa_bitmask_isbitset_func_t _numa_bitmask_isbitset; - static numa_distance_func_t _numa_distance; -@@ -277,6 +282,7 @@ - static void set_numa_available(numa_available_func_t func) { _numa_available = func; } - static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; } - static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; } -+ static void set_numa_interleave_memory_v2(numa_interleave_memory_v2_func_t func) { _numa_interleave_memory_v2 = func; } - static void set_numa_set_bind_policy(numa_set_bind_policy_func_t func) { _numa_set_bind_policy = func; } - static void set_numa_bitmask_isbitset(numa_bitmask_isbitset_func_t func) { _numa_bitmask_isbitset = func; } - static void set_numa_distance(numa_distance_func_t func) { _numa_distance = func; } -@@ -298,7 +304,10 @@ - return _numa_tonode_memory != NULL ? _numa_tonode_memory(start, size, node) : -1; - } - static void numa_interleave_memory(void *start, size_t size) { -- if (_numa_interleave_memory != NULL && _numa_all_nodes != NULL) { -+ // Use v2 api if available -+ if (_numa_interleave_memory_v2 != NULL && _numa_all_nodes_ptr != NULL) { -+ _numa_interleave_memory_v2(start, size, _numa_all_nodes_ptr); -+ } else if (_numa_interleave_memory != NULL && _numa_all_nodes != NULL) { - _numa_interleave_memory(start, size, _numa_all_nodes); - } - }
--- a/patches/hotspot/aarch32/8181810-pr3466-rh1498319.patch Fri Mar 23 04:41:00 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -# HG changeset patch -# User mdoerr -# Date 1507752266 -3600 -# Wed Oct 11 21:04:26 2017 +0100 -# Node ID 5c00d5cd7677aec3549afe02e4f9de8dc7b20bef -# Parent 3c499a0ba92b1affb3f473c6502e374f4785aba9 -8181810, PR3466, RH1498319: PPC64: Leverage extrdi for bitfield extract -Reviewed-by: mdoerr, simonis -Contributed-by: Matthew Brandyberry <mbrandy@linux.vnet.ibm.com> - -diff --git a/src/cpu/ppc/vm/ppc.ad b/src/cpu/ppc/vm/ppc.ad ---- openjdk/hotspot/src/cpu/ppc/vm/ppc.ad -+++ openjdk/hotspot/src/cpu/ppc/vm/ppc.ad -@@ -1,6 +1,6 @@ - // - // Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. --// Copyright 2012, 2014 SAP AG. All rights reserved. -+// Copyright (c) 2012, 2017 SAP SE. All rights reserved. - // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - // - // This code is free software; you can redistribute it and/or modify it -@@ -8610,6 +8610,44 @@ - ins_pipe(pipe_class_default); - %} - -+// Bitfield Extract: URShiftI + AndI -+instruct andI_urShiftI_regI_immI_immIpow2minus1(iRegIdst dst, iRegIsrc src1, immI src2, immIpow2minus1 src3) %{ -+ match(Set dst (AndI (URShiftI src1 src2) src3)); -+ -+ format %{ "EXTRDI $dst, $src1, shift=$src2, mask=$src3 \t// int bitfield extract" %} -+ size(4); -+ ins_encode %{ -+ // TODO: PPC port $archOpcode(ppc64Opcode_rldicl); -+ int rshift = ($src2$$constant) & 0x1f; -+ int length = log2_long(((jlong) $src3$$constant) + 1); -+ if (rshift + length > 32) { -+ // if necessary, adjust mask to omit rotated bits. -+ length = 32 - rshift; -+ } -+ __ extrdi($dst$$Register, $src1$$Register, length, 64 - (rshift + length)); -+ %} -+ ins_pipe(pipe_class_default); -+%} -+ -+// Bitfield Extract: URShiftL + AndL -+instruct andL_urShiftL_regL_immI_immLpow2minus1(iRegLdst dst, iRegLsrc src1, immI src2, immLpow2minus1 src3) %{ -+ match(Set dst (AndL (URShiftL src1 src2) src3)); -+ -+ format %{ "EXTRDI $dst, $src1, shift=$src2, mask=$src3 \t// long bitfield extract" %} -+ size(4); -+ ins_encode %{ -+ // TODO: PPC port $archOpcode(ppc64Opcode_rldicl); -+ int rshift = ($src2$$constant) & 0x3f; -+ int length = log2_long(((jlong) $src3$$constant) + 1); -+ if (rshift + length > 64) { -+ // if necessary, adjust mask to omit rotated bits. -+ length = 64 - rshift; -+ } -+ __ extrdi($dst$$Register, $src1$$Register, length, 64 - (rshift + length)); -+ %} -+ ins_pipe(pipe_class_default); -+%} -+ - instruct sxtI_reg(iRegIdst dst, iRegIsrc src) %{ - match(Set dst (ConvL2I (ConvI2L src))); -
--- a/patches/hotspot/aarch32/8185164-pr3438.patch Fri Mar 23 04:41:00 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -# HG changeset patch -# User dbuck -# Date 1502509867 14400 -# Fri Aug 11 23:51:07 2017 -0400 -# Node ID 302eb515bf52ceacf17b6e620db2d2b862dfefa2 -# Parent 5c00d5cd7677aec3549afe02e4f9de8dc7b20bef -8185164, PR3438: GetOwnedMonitorInfo() returns incorrect owned monitor -Summary: The GetOwnedMonitorInfo() should not return a pending monitor -Reviewed-by: dcubed - -diff --git a/src/share/vm/runtime/objectMonitor.cpp b/src/share/vm/runtime/objectMonitor.cpp ---- openjdk/hotspot/src/share/vm/runtime/objectMonitor.cpp -+++ openjdk/hotspot/src/share/vm/runtime/objectMonitor.cpp -@@ -381,6 +381,8 @@ - { // Change java thread status to indicate blocked on monitor enter. - JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this); - -+ Self->set_current_pending_monitor(this); -+ - DTRACE_MONITOR_PROBE(contended__enter, this, object(), jt); - if (JvmtiExport::should_post_monitor_contended_enter()) { - JvmtiExport::post_monitor_contended_enter(jt, this); -@@ -395,8 +397,6 @@ - OSThreadContendState osts(Self->osthread()); - ThreadBlockInVM tbivm(jt); - -- Self->set_current_pending_monitor(this); -- - // TODO-FIXME: change the following for(;;) loop to straight-line code. - for (;;) { - jt->set_suspend_equivalent();