< prev index next >

src/hotspot/cpu/x86/jniFastGetField_x86_64.cpp

Print this page

        

*** 33,45 **** #define __ masm-> #define BUFFER_SIZE 30*wordSize - // Instead of issuing lfence for LoadLoad barrier, we create data dependency - // between loads, which is more efficient than lfence. - // Common register usage: // rax/xmm0: result // c_rarg0: jni env // c_rarg1: obj // c_rarg2: jfield id --- 33,42 ----
*** 75,90 **** ExternalAddress counter(SafepointSynchronize::safepoint_counter_addr()); __ mov32 (rcounter, counter); __ mov (robj, c_rarg1); __ testb (rcounter, 1); __ jcc (Assembler::notZero, slow); - - __ xorptr(robj, rcounter); - __ xorptr(robj, rcounter); // obj, since - // robj ^ rcounter ^ rcounter == robj - // robj is data dependent on rcounter. - __ mov (roffset, c_rarg2); __ shrptr(roffset, 2); // offset // Both robj and rtmp are clobbered by try_resolve_jobject_in_native. BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); --- 72,81 ----
*** 101,116 **** case T_INT: __ movl (rax, Address(robj, roffset, Address::times_1)); break; case T_LONG: __ movq (rax, Address(robj, roffset, Address::times_1)); break; default: ShouldNotReachHere(); } ! // create data dependency on rax ! __ lea(rcounter_addr, counter); ! __ xorptr(rcounter_addr, rax); ! __ xorptr(rcounter_addr, rax); ! __ cmpl (rcounter, Address(rcounter_addr, 0)); ! __ jcc (Assembler::notEqual, slow); __ ret (0); slowcase_entry_pclist[count++] = __ pc(); --- 92,102 ---- case T_INT: __ movl (rax, Address(robj, roffset, Address::times_1)); break; case T_LONG: __ movq (rax, Address(robj, roffset, Address::times_1)); break; default: ShouldNotReachHere(); } ! __ cmp32 (rcounter, counter); __ jcc (Assembler::notEqual, slow); __ ret (0); slowcase_entry_pclist[count++] = __ pc();
*** 176,190 **** __ mov32 (rcounter, counter); __ mov (robj, c_rarg1); __ testb (rcounter, 1); __ jcc (Assembler::notZero, slow); - __ xorptr(robj, rcounter); - __ xorptr(robj, rcounter); // obj, since - // robj ^ rcounter ^ rcounter == robj - // robj is data dependent on rcounter. - // Both robj and rtmp are clobbered by try_resolve_jobject_in_native. BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler(); bs->try_resolve_jobject_in_native(masm, /* jni_env */ c_rarg0, robj, rtmp, slow); DEBUG_ONLY(__ movl(rtmp, 0xDEADC0DE);) --- 162,171 ----
*** 196,212 **** switch (type) { case T_FLOAT: __ movflt (xmm0, Address(robj, roffset, Address::times_1)); break; case T_DOUBLE: __ movdbl (xmm0, Address(robj, roffset, Address::times_1)); break; default: ShouldNotReachHere(); } ! ! __ lea(rcounter_addr, counter); ! __ movdq (rax, xmm0); ! // counter address is data dependent on xmm0. ! __ xorptr(rcounter_addr, rax); ! __ xorptr(rcounter_addr, rax); ! __ cmpl (rcounter, Address(rcounter_addr, 0)); __ jcc (Assembler::notEqual, slow); __ ret (0); slowcase_entry_pclist[count++] = __ pc(); --- 177,187 ---- switch (type) { case T_FLOAT: __ movflt (xmm0, Address(robj, roffset, Address::times_1)); break; case T_DOUBLE: __ movdbl (xmm0, Address(robj, roffset, Address::times_1)); break; default: ShouldNotReachHere(); } ! __ cmp32 (rcounter, counter); __ jcc (Assembler::notEqual, slow); __ ret (0); slowcase_entry_pclist[count++] = __ pc();
< prev index next >