--- old/src/hotspot/cpu/x86/jniFastGetField_x86_32.cpp 2018-09-26 10:01:54.179553495 -0400 +++ new/src/hotspot/cpu/x86/jniFastGetField_x86_32.cpp 2018-09-26 10:01:52.619462725 -0400 @@ -75,15 +75,11 @@ __ mov32 (rcx, counter); __ testb (rcx, 1); __ jcc (Assembler::notZero, slow); - if (os::is_MP()) { - __ mov(rax, rcx); - __ andptr(rax, 1); // rax, must end up 0 - __ movptr(rdx, Address(rsp, rax, Address::times_1, 2*wordSize)); - // obj, notice rax, is 0. - // rdx is data dependent on rcx. - } else { - __ movptr (rdx, Address(rsp, 2*wordSize)); // obj - } + __ mov(rax, rcx); + __ andptr(rax, 1); // rax, must end up 0 + __ movptr(rdx, Address(rsp, rax, Address::times_1, 2*wordSize)); + // obj, notice rax, is 0. + // rdx is data dependent on rcx. __ movptr(rax, Address(rsp, 3*wordSize)); // jfieldID __ clear_jweak_tag(rdx); @@ -103,17 +99,13 @@ } Address ca1; - if (os::is_MP()) { - __ lea(rdx, counter); - __ xorptr(rdx, rax); - __ xorptr(rdx, rax); - __ cmp32(rcx, Address(rdx, 0)); - // ca1 is the same as ca because - // rax, ^ counter_addr ^ rax, = address - // ca1 is data dependent on rax,. - } else { - __ cmp32(rcx, counter); - } + __ lea(rdx, counter); + __ xorptr(rdx, rax); + __ xorptr(rdx, rax); + __ cmp32(rcx, Address(rdx, 0)); + // ca1 is the same as ca because + // rax, ^ counter_addr ^ rax, = address + // ca1 is data dependent on rax,. __ jcc (Assembler::notEqual, slow); #ifndef _WINDOWS @@ -195,15 +187,11 @@ __ mov32 (rcx, counter); __ testb (rcx, 1); __ jcc (Assembler::notZero, slow); - if (os::is_MP()) { - __ mov(rax, rcx); - __ andptr(rax, 1); // rax, must end up 0 - __ movptr(rdx, Address(rsp, rax, Address::times_1, 3*wordSize)); - // obj, notice rax, is 0. - // rdx is data dependent on rcx. - } else { - __ movptr(rdx, Address(rsp, 3*wordSize)); // obj - } + __ mov(rax, rcx); + __ andptr(rax, 1); // rax, must end up 0 + __ movptr(rdx, Address(rsp, rax, Address::times_1, 3*wordSize)); + // obj, notice rax, is 0. + // rdx is data dependent on rcx. __ movptr(rsi, Address(rsp, 4*wordSize)); // jfieldID __ clear_jweak_tag(rdx); @@ -219,19 +207,15 @@ __ movl(rdx, Address(rdx, rsi, Address::times_1, 4)); #endif // _LP64 - if (os::is_MP()) { - __ lea(rsi, counter); - __ xorptr(rsi, rdx); - __ xorptr(rsi, rax); - __ xorptr(rsi, rdx); - __ xorptr(rsi, rax); - __ cmp32(rcx, Address(rsi, 0)); - // ca1 is the same as ca because - // rax, ^ rdx ^ counter_addr ^ rax, ^ rdx = address - // ca1 is data dependent on both rax, and rdx. - } else { - __ cmp32(rcx, counter); - } + __ lea(rsi, counter); + __ xorptr(rsi, rdx); + __ xorptr(rsi, rax); + __ xorptr(rsi, rdx); + __ xorptr(rsi, rax); + __ cmp32(rcx, Address(rsi, 0)); + // ca1 is the same as ca because + // rax, ^ rdx ^ counter_addr ^ rax, ^ rdx = address + // ca1 is data dependent on both rax, and rdx. __ jcc (Assembler::notEqual, slow); __ pop (rsi); @@ -287,15 +271,11 @@ __ mov32 (rcx, counter); __ testb (rcx, 1); __ jcc (Assembler::notZero, slow); - if (os::is_MP()) { - __ mov(rax, rcx); - __ andptr(rax, 1); // rax, must end up 0 - __ movptr(rdx, Address(rsp, rax, Address::times_1, 2*wordSize)); - // obj, notice rax, is 0. - // rdx is data dependent on rcx. - } else { - __ movptr(rdx, Address(rsp, 2*wordSize)); // obj - } + __ mov(rax, rcx); + __ andptr(rax, 1); // rax, must end up 0 + __ movptr(rdx, Address(rsp, rax, Address::times_1, 2*wordSize)); + // obj, notice rax, is 0. + // rdx is data dependent on rcx. __ movptr(rax, Address(rsp, 3*wordSize)); // jfieldID __ clear_jweak_tag(rdx); @@ -317,20 +297,16 @@ } Address ca1; - if (os::is_MP()) { - __ fst_s (Address(rsp, -4)); - __ lea(rdx, counter); - __ movl (rax, Address(rsp, -4)); - // garbage hi-order bits on 64bit are harmless. - __ xorptr(rdx, rax); - __ xorptr(rdx, rax); - __ cmp32(rcx, Address(rdx, 0)); - // rax, ^ counter_addr ^ rax, = address - // ca1 is data dependent on the field - // access. - } else { - __ cmp32(rcx, counter); - } + __ fst_s (Address(rsp, -4)); + __ lea(rdx, counter); + __ movl (rax, Address(rsp, -4)); + // garbage hi-order bits on 64bit are harmless. + __ xorptr(rdx, rax); + __ xorptr(rdx, rax); + __ cmp32(rcx, Address(rdx, 0)); + // rax, ^ counter_addr ^ rax, = address + // ca1 is data dependent on the field + // access. __ jcc (Assembler::notEqual, slow_with_pop); #ifndef _WINDOWS