< prev index next >

src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp

Print this page




 953     assert(DataLayout::counter_increment == 1,
 954            "flow-free idiom only works with 1");
 955     // Intel does this
 956     // Increment the register.  Set carry flag.
 957     // addptr(data, DataLayout::counter_increment);
 958     // If the increment causes the counter to overflow, pull back by 1.
 959     // sbbptr(data, (int32_t)0);
 960     // so we do this
 961     ldr(rscratch1, addr);
 962     adds(rscratch1, rscratch1, DataLayout::counter_increment);
 963     Label L;
 964     br(Assembler::CS, L);       // skip store if counter overflow
 965     str(rscratch1, addr);
 966     bind(L);
 967   }
 968 }
 969 
 970 void InterpreterMacroAssembler::set_mdp_flag_at(Register mdp_in,
 971                                                 int flag_byte_constant) {
 972   assert(ProfileInterpreter, "must be profiling interpreter");
 973   int header_offset = in_bytes(DataLayout::header_offset());
 974   int header_bits = DataLayout::flag_mask_to_header_mask(flag_byte_constant);
 975   // Set the flag
 976   ldr(rscratch1, Address(mdp_in, header_offset));
 977   orr(rscratch1, rscratch1, header_bits);
 978   str(rscratch1, Address(mdp_in, header_offset));
 979 }
 980 
 981 
 982 void InterpreterMacroAssembler::test_mdp_data_at(Register mdp_in,
 983                                                  int offset,
 984                                                  Register value,
 985                                                  Register test_value_out,
 986                                                  Label& not_equal_continue) {
 987   assert(ProfileInterpreter, "must be profiling interpreter");
 988   if (test_value_out == noreg) {
 989     ldr(rscratch1, Address(mdp_in, offset));
 990     cmp(value, rscratch1);
 991   } else {
 992     // Put the test value into a register, so caller can use it:
 993     ldr(test_value_out, Address(mdp_in, offset));
 994     cmp(value, test_value_out);
 995   }
 996   br(Assembler::NE, not_equal_continue);
 997 }
 998 




 953     assert(DataLayout::counter_increment == 1,
 954            "flow-free idiom only works with 1");
 955     // Intel does this
 956     // Increment the register.  Set carry flag.
 957     // addptr(data, DataLayout::counter_increment);
 958     // If the increment causes the counter to overflow, pull back by 1.
 959     // sbbptr(data, (int32_t)0);
 960     // so we do this
 961     ldr(rscratch1, addr);
 962     adds(rscratch1, rscratch1, DataLayout::counter_increment);
 963     Label L;
 964     br(Assembler::CS, L);       // skip store if counter overflow
 965     str(rscratch1, addr);
 966     bind(L);
 967   }
 968 }
 969 
 970 void InterpreterMacroAssembler::set_mdp_flag_at(Register mdp_in,
 971                                                 int flag_byte_constant) {
 972   assert(ProfileInterpreter, "must be profiling interpreter");
 973   int flags_offset = in_bytes(DataLayout::flags_offset());

 974   // Set the flag
 975   ldrb(rscratch1, Address(mdp_in, flags_offset));
 976   orr(rscratch1, rscratch1, flag_byte_constant);
 977   strb(rscratch1, Address(mdp_in, flags_offset));
 978 }
 979 
 980 
 981 void InterpreterMacroAssembler::test_mdp_data_at(Register mdp_in,
 982                                                  int offset,
 983                                                  Register value,
 984                                                  Register test_value_out,
 985                                                  Label& not_equal_continue) {
 986   assert(ProfileInterpreter, "must be profiling interpreter");
 987   if (test_value_out == noreg) {
 988     ldr(rscratch1, Address(mdp_in, offset));
 989     cmp(value, rscratch1);
 990   } else {
 991     // Put the test value into a register, so caller can use it:
 992     ldr(test_value_out, Address(mdp_in, offset));
 993     cmp(value, test_value_out);
 994   }
 995   br(Assembler::NE, not_equal_continue);
 996 }
 997 


< prev index next >