mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-26 07:40:09 +00:00
8211046: Forced data dependencies serve no purpose on x86
Reviewed-by: eosterlund, rehn
This commit is contained in:
parent
f4df5cb4c3
commit
55692eb0ca
@ -35,9 +35,6 @@
|
||||
|
||||
#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
|
||||
@ -77,12 +74,6 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
__ 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
|
||||
|
||||
@ -103,12 +94,7 @@ address JNI_FastGetField::generate_fast_get_int_field0(BasicType type) {
|
||||
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));
|
||||
|
||||
__ cmp32 (rcounter, counter);
|
||||
__ jcc (Assembler::notEqual, slow);
|
||||
|
||||
__ ret (0);
|
||||
@ -178,11 +164,6 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
__ 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);
|
||||
@ -198,13 +179,7 @@ address JNI_FastGetField::generate_fast_get_float_field0(BasicType type) {
|
||||
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));
|
||||
__ cmp32 (rcounter, counter);
|
||||
__ jcc (Assembler::notEqual, slow);
|
||||
|
||||
__ ret (0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user