< prev index next >

src/hotspot/cpu/x86/interp_masm_x86.cpp

Print this page




1418     // Increment the register.  Set carry flag.
1419     addptr(data, DataLayout::counter_increment);
1420     // If the increment causes the counter to overflow, pull back by 1.
1421     sbbptr(data, (int32_t)0);
1422   }
1423 }
1424 
1425 
1426 void InterpreterMacroAssembler::increment_mdp_data_at(Register mdp_in,
1427                                                       Register reg,
1428                                                       int constant,
1429                                                       bool decrement) {
1430   Address data(mdp_in, reg, Address::times_1, constant);
1431 
1432   increment_mdp_data_at(data, decrement);
1433 }
1434 
1435 void InterpreterMacroAssembler::set_mdp_flag_at(Register mdp_in,
1436                                                 int flag_byte_constant) {
1437   assert(ProfileInterpreter, "must be profiling interpreter");
1438   int header_offset = in_bytes(DataLayout::header_offset());
1439   int header_bits = DataLayout::flag_mask_to_header_mask(flag_byte_constant);
1440   // Set the flag
1441   orl(Address(mdp_in, header_offset), header_bits);
1442 }
1443 
1444 
1445 
1446 void InterpreterMacroAssembler::test_mdp_data_at(Register mdp_in,
1447                                                  int offset,
1448                                                  Register value,
1449                                                  Register test_value_out,
1450                                                  Label& not_equal_continue) {
1451   assert(ProfileInterpreter, "must be profiling interpreter");
1452   if (test_value_out == noreg) {
1453     cmpptr(value, Address(mdp_in, offset));
1454   } else {
1455     // Put the test value into a register, so caller can use it:
1456     movptr(test_value_out, Address(mdp_in, offset));
1457     cmpptr(test_value_out, value);
1458   }
1459   jcc(Assembler::notEqual, not_equal_continue);
1460 }
1461 




1418     // Increment the register.  Set carry flag.
1419     addptr(data, DataLayout::counter_increment);
1420     // If the increment causes the counter to overflow, pull back by 1.
1421     sbbptr(data, (int32_t)0);
1422   }
1423 }
1424 
1425 
1426 void InterpreterMacroAssembler::increment_mdp_data_at(Register mdp_in,
1427                                                       Register reg,
1428                                                       int constant,
1429                                                       bool decrement) {
1430   Address data(mdp_in, reg, Address::times_1, constant);
1431 
1432   increment_mdp_data_at(data, decrement);
1433 }
1434 
1435 void InterpreterMacroAssembler::set_mdp_flag_at(Register mdp_in,
1436                                                 int flag_byte_constant) {
1437   assert(ProfileInterpreter, "must be profiling interpreter");
1438   int header_offset = in_bytes(DataLayout::flags_offset());
1439   int header_bits = flag_byte_constant;
1440   // Set the flag
1441   orb(Address(mdp_in, header_offset), header_bits);
1442 }
1443 
1444 
1445 
1446 void InterpreterMacroAssembler::test_mdp_data_at(Register mdp_in,
1447                                                  int offset,
1448                                                  Register value,
1449                                                  Register test_value_out,
1450                                                  Label& not_equal_continue) {
1451   assert(ProfileInterpreter, "must be profiling interpreter");
1452   if (test_value_out == noreg) {
1453     cmpptr(value, Address(mdp_in, offset));
1454   } else {
1455     // Put the test value into a register, so caller can use it:
1456     movptr(test_value_out, Address(mdp_in, offset));
1457     cmpptr(test_value_out, value);
1458   }
1459   jcc(Assembler::notEqual, not_equal_continue);
1460 }
1461 


< prev index next >