< prev index next >

src/cpu/x86/vm/templateTable_x86.cpp

Print this page

        

*** 2872,2891 **** --- 2872,2894 ---- const Register index = rdx; const Register obj = LP64_ONLY(c_rarg3) NOT_LP64(rcx); const Register off = rbx; const Register flags = rax; const Register bc = LP64_ONLY(c_rarg3) NOT_LP64(rcx); // uses same reg as obj, so don't mix them + const Register flags2 = rdx; resolve_cache_and_index(byte_no, cache, index, sizeof(u2)); jvmti_post_field_access(cache, index, is_static, false); load_field_cp_cache_entry(obj, cache, index, off, flags, is_static); const Address field(obj, off, Address::times_1, 0*wordSize); NOT_LP64(const Address hi(obj, off, Address::times_1, 1*wordSize)); Label Done, notByte, notBool, notInt, notShort, notChar, notLong, notFloat, notObj, notValueType, notDouble; + __ movl(flags2, flags); + __ shrl(flags, ConstantPoolCacheEntry::tos_state_shift); // Make sure we don't need to mask edx after the above shift assert(btos == 0, "change code, btos != 0"); __ andl(flags, ConstantPoolCacheEntry::tos_state_mask);
*** 2910,2928 **** Label initialized; // Issue below if the static field has not been initialized yet __ load_heap_oop(rax, field); __ testptr(rax, rax); __ jcc(Assembler::notZero, initialized); __ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::initialize_static_value_field), ! obj, off); __ verify_oop(rax); __ bind(initialized); __ push(qtos); } else { pop_and_check_object(obj); call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::qgetfield), ! obj, off); __ verify_oop(rax); __ push(qtos); // Bytecode rewrite? } __ jmp(Done); --- 2913,2933 ---- Label initialized; // Issue below if the static field has not been initialized yet __ load_heap_oop(rax, field); __ testptr(rax, rax); __ jcc(Assembler::notZero, initialized); + __ andl(flags2, ConstantPoolCacheEntry::field_index_mask); __ call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::initialize_static_value_field), ! obj, flags2); __ verify_oop(rax); __ bind(initialized); __ push(qtos); } else { pop_and_check_object(obj); + __ andl(flags2, ConstantPoolCacheEntry::field_index_mask); call_VM(rax, CAST_FROM_FN_PTR(address, InterpreterRuntime::qgetfield), ! obj, flags2); __ verify_oop(rax); __ push(qtos); // Bytecode rewrite? } __ jmp(Done);
*** 3173,3195 **** const Register index = rdx; const Register obj = rcx; const Register off = rbx; const Register flags = rax; const Register bc = LP64_ONLY(c_rarg3) NOT_LP64(rcx); resolve_cache_and_index(byte_no, cache, index, sizeof(u2)); jvmti_post_field_mod(cache, index, is_static); load_field_cp_cache_entry(obj, cache, index, off, flags, is_static); // [jk] not needed currently // volatile_barrier(Assembler::Membar_mask_bits(Assembler::LoadStore | // Assembler::StoreStore)); Label notVolatile, Done; ! __ movl(rdx, flags); ! __ shrl(rdx, ConstantPoolCacheEntry::is_volatile_shift); ! __ andl(rdx, 0x1); // field addresses const Address field(obj, off, Address::times_1, 0*wordSize); NOT_LP64( const Address hi(obj, off, Address::times_1, 1*wordSize);) --- 3178,3200 ---- const Register index = rdx; const Register obj = rcx; const Register off = rbx; const Register flags = rax; const Register bc = LP64_ONLY(c_rarg3) NOT_LP64(rcx); + const Register flags2 = rdx; resolve_cache_and_index(byte_no, cache, index, sizeof(u2)); jvmti_post_field_mod(cache, index, is_static); load_field_cp_cache_entry(obj, cache, index, off, flags, is_static); // [jk] not needed currently // volatile_barrier(Assembler::Membar_mask_bits(Assembler::LoadStore | // Assembler::StoreStore)); Label notVolatile, Done; ! ! __ movl(flags2, flags); // field addresses const Address field(obj, off, Address::times_1, 0*wordSize); NOT_LP64( const Address hi(obj, off, Address::times_1, 1*wordSize);)
*** 3252,3272 **** // qtos { __ pop(qtos); // => rax == value if (!is_static) { // value types in non-static fields are embedded - __ movl(rcx, off); pop_and_check_object(rbx); call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::qputfield), ! rbx, rax, rcx); __ jmp(notVolatile); // value types are never volatile } else { // Store into the static field // Value types in static fields are currently handled with indirection // but a copy to the Java heap might be required if the value is currently // stored in a thread local buffer ! call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::qputstatic), rax); } __ jmp(Done); } __ bind(notValueType); --- 3257,3276 ---- // qtos { __ pop(qtos); // => rax == value if (!is_static) { // value types in non-static fields are embedded pop_and_check_object(rbx); call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::qputfield), ! rbx, rax, flags2); __ jmp(notVolatile); // value types are never volatile } else { // Store into the static field // Value types in static fields are currently handled with indirection // but a copy to the Java heap might be required if the value is currently // stored in a thread local buffer ! call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::qputstatic), rax, off, obj); } __ jmp(Done); } __ bind(notValueType);
*** 3399,3410 **** __ stop("Bad state"); #endif __ bind(Done); // Check for volatile store ! __ testl(rdx, rdx); __ jcc(Assembler::zero, notVolatile); volatile_barrier(Assembler::Membar_mask_bits(Assembler::StoreLoad | Assembler::StoreStore)); __ bind(notVolatile); } --- 3403,3417 ---- __ stop("Bad state"); #endif __ bind(Done); + __ shrl(flags2, ConstantPoolCacheEntry::is_volatile_shift); + __ andl(flags2, 0x1); + // Check for volatile store ! __ testl(flags2, flags2); __ jcc(Assembler::zero, notVolatile); volatile_barrier(Assembler::Membar_mask_bits(Assembler::StoreLoad | Assembler::StoreStore)); __ bind(notVolatile); }
< prev index next >