2032 __ ld_ptr(Address(cache, flags_offset), flags);
2033 }
2034
2035 // The Rcache register must be set before call
2036 void TemplateTable::load_field_cp_cache_entry(Register Robj,
2037 Register Rcache,
2038 Register index,
2039 Register Roffset,
2040 Register Rflags,
2041 bool is_static) {
2042 assert_different_registers(Rcache, Rflags, Roffset);
2043
2044 ByteSize cp_base_offset = ConstantPoolCache::base_offset();
2045
2046 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::flags_offset(), Rflags);
2047 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Roffset);
2048 if (is_static) {
2049 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f1_offset(), Robj);
2050 const int mirror_offset = in_bytes(Klass::java_mirror_offset());
2051 __ ld_ptr( Robj, mirror_offset, Robj);
2052 }
2053 }
2054
2055 // The registers Rcache and index expected to be set before call.
2056 // Correct values of the Rcache and index registers are preserved.
2057 void TemplateTable::jvmti_post_field_access(Register Rcache,
2058 Register index,
2059 bool is_static,
2060 bool has_tos) {
2061 ByteSize cp_base_offset = ConstantPoolCache::base_offset();
2062
2063 if (JvmtiExport::can_post_field_access()) {
2064 // Check to see if a field access watch has been set before we take
2065 // the time to call into the VM.
2066 Label Label1;
2067 assert_different_registers(Rcache, index, G1_scratch);
2068 AddressLiteral get_field_access_count_addr(JvmtiExport::get_field_access_count_addr());
2069 __ load_contents(get_field_access_count_addr, G1_scratch);
2070 __ cmp_and_br_short(G1_scratch, 0, Assembler::equal, Assembler::pt, Label1);
2071
|
2032 __ ld_ptr(Address(cache, flags_offset), flags);
2033 }
2034
2035 // The Rcache register must be set before call
2036 void TemplateTable::load_field_cp_cache_entry(Register Robj,
2037 Register Rcache,
2038 Register index,
2039 Register Roffset,
2040 Register Rflags,
2041 bool is_static) {
2042 assert_different_registers(Rcache, Rflags, Roffset);
2043
2044 ByteSize cp_base_offset = ConstantPoolCache::base_offset();
2045
2046 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::flags_offset(), Rflags);
2047 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f2_offset(), Roffset);
2048 if (is_static) {
2049 __ ld_ptr(Rcache, cp_base_offset + ConstantPoolCacheEntry::f1_offset(), Robj);
2050 const int mirror_offset = in_bytes(Klass::java_mirror_offset());
2051 __ ld_ptr( Robj, mirror_offset, Robj);
2052 __ resolve_oop_handle(Robj);
2053 }
2054 }
2055
2056 // The registers Rcache and index expected to be set before call.
2057 // Correct values of the Rcache and index registers are preserved.
2058 void TemplateTable::jvmti_post_field_access(Register Rcache,
2059 Register index,
2060 bool is_static,
2061 bool has_tos) {
2062 ByteSize cp_base_offset = ConstantPoolCache::base_offset();
2063
2064 if (JvmtiExport::can_post_field_access()) {
2065 // Check to see if a field access watch has been set before we take
2066 // the time to call into the VM.
2067 Label Label1;
2068 assert_different_registers(Rcache, index, G1_scratch);
2069 AddressLiteral get_field_access_count_addr(JvmtiExport::get_field_access_count_addr());
2070 __ load_contents(get_field_access_count_addr, G1_scratch);
2071 __ cmp_and_br_short(G1_scratch, 0, Assembler::equal, Assembler::pt, Label1);
2072
|