--- old/src/hotspot/cpu/arm/templateTable_arm.cpp 2018-09-20 10:18:02.629127790 +0300 +++ new/src/hotspot/cpu/arm/templateTable_arm.cpp 2018-09-20 10:18:02.421115576 +0300 @@ -3145,15 +3145,11 @@ const Register Rindex = R5_tmp; const Register Rflags = R5_tmp; - const bool gen_volatile_check = os::is_MP(); - resolve_cache_and_index(byte_no, Rcache, Rindex, sizeof(u2)); jvmti_post_field_access(Rcache, Rindex, is_static, false); load_field_cp_cache_entry(Rcache, Rindex, Roffset, Rflags, Robj, is_static); - if (gen_volatile_check) { - __ mov(Rflagsav, Rflags); - } + __ mov(Rflagsav, Rflags); if (!is_static) pop_and_check_object(Robj); @@ -3390,7 +3386,7 @@ __ bind(Done); - if (gen_volatile_check) { + { // Check for volatile field Label notVolatile; __ tbz(Rflagsav, ConstantPoolCacheEntry::is_volatile_shift, notVolatile); @@ -3491,13 +3487,11 @@ const Register Rindex = R5_tmp; const Register Rflags = R5_tmp; - const bool gen_volatile_check = os::is_MP(); - resolve_cache_and_index(byte_no, Rcache, Rindex, sizeof(u2)); jvmti_post_field_mod(Rcache, Rindex, is_static); load_field_cp_cache_entry(Rcache, Rindex, Roffset, Rflags, Robj, is_static); - if (gen_volatile_check) { + { // Check for volatile field Label notVolatile; __ mov(Rflagsav, Rflags); @@ -3732,7 +3726,7 @@ __ bind(Done); - if (gen_volatile_check) { + { Label notVolatile; if (is_static) { // Just check for volatile. Memory barrier for static final field @@ -3831,22 +3825,18 @@ const Register Rflags = Rtmp_save0; // R4/R19 const Register Robj = R5_tmp; - const bool gen_volatile_check = os::is_MP(); - // access constant pool cache __ get_cache_and_index_at_bcp(Rcache, Rindex, 1); __ add(Rcache, Rcache, AsmOperand(Rindex, lsl, LogBytesPerWord)); - if (gen_volatile_check) { - // load flags to test volatile - __ ldr_u32(Rflags, Address(Rcache, base + ConstantPoolCacheEntry::flags_offset())); - } + // load flags to test volatile + __ ldr_u32(Rflags, Address(Rcache, base + ConstantPoolCacheEntry::flags_offset())); // replace index with field offset from cache entry __ ldr(Roffset, Address(Rcache, base + ConstantPoolCacheEntry::f2_offset())); - if (gen_volatile_check) { + { // Check for volatile store Label notVolatile; __ tbz(Rflags, ConstantPoolCacheEntry::is_volatile_shift, notVolatile); @@ -3902,7 +3892,7 @@ ShouldNotReachHere(); } - if (gen_volatile_check) { + { Label notVolatile; Label skipMembar; __ tst(Rflags, 1 << ConstantPoolCacheEntry::is_volatile_shift | @@ -3953,18 +3943,14 @@ const Register Rindex = R3_tmp; const Register Roffset = R3_tmp; - const bool gen_volatile_check = os::is_MP(); - // access constant pool cache __ get_cache_and_index_at_bcp(Rcache, Rindex, 1); // replace index with field offset from cache entry __ add(Rtemp, Rcache, AsmOperand(Rindex, lsl, LogBytesPerWord)); __ ldr(Roffset, Address(Rtemp, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::f2_offset())); - if (gen_volatile_check) { - // load flags to test volatile - __ ldr_u32(Rflags, Address(Rtemp, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset())); - } + // load flags to test volatile + __ ldr_u32(Rflags, Address(Rtemp, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset())); __ verify_oop(Robj); __ null_check(Robj, Rtemp); @@ -4007,7 +3993,7 @@ ShouldNotReachHere(); } - if (gen_volatile_check) { + { // Check for volatile load Label notVolatile; __ tbz(Rflags, ConstantPoolCacheEntry::is_volatile_shift, notVolatile); @@ -4038,12 +4024,8 @@ __ add(Rtemp, Rcache, AsmOperand(Rindex, lsl, LogBytesPerWord)); __ ldr(Roffset, Address(Rtemp, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::f2_offset())); - const bool gen_volatile_check = os::is_MP(); - - if (gen_volatile_check) { - // load flags to test volatile - __ ldr_u32(Rflags, Address(Rtemp, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset())); - } + // load flags to test volatile + __ ldr_u32(Rflags, Address(Rtemp, ConstantPoolCache::base_offset() + ConstantPoolCacheEntry::flags_offset())); // make sure exception is reported in correct bcp range (getfield is next instruction) __ add(Rbcp, Rbcp, 1); @@ -4099,7 +4081,7 @@ } #ifndef AARCH64 - if (gen_volatile_check) { + { // Check for volatile load Label notVolatile; __ tbz(Rflags, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);