@@ -955,47 +955,29 @@ void InterpreterMacroAssembler::set_mdp_data_at(Register mdp_in,
955955
956956
957957void InterpreterMacroAssembler::increment_mdp_data_at (Register mdp_in,
958- int constant,
959- bool decrement) {
960- increment_mdp_data_at (mdp_in, noreg, constant, decrement);
958+ int constant) {
959+ increment_mdp_data_at (mdp_in, noreg, constant);
961960}
962961
963962void InterpreterMacroAssembler::increment_mdp_data_at (Register mdp_in,
964- Register reg,
965- int constant,
966- bool decrement) {
963+ Register index,
964+ int constant) {
967965 assert (ProfileInterpreter, " must be profiling interpreter" );
968- // %%% this does 64bit counters at best it is wasting space
969- // at worst it is a rare bug when counters overflow
970966
971- assert_different_registers (t1, t0, mdp_in, reg );
967+ assert_different_registers (t1, t0, mdp_in, index );
972968
973969 Address addr1 (mdp_in, constant);
974970 Address addr2 (t1, 0 );
975971 Address &addr = addr1;
976- if (reg != noreg) {
972+ if (index != noreg) {
977973 la (t1, addr1);
978- add (t1, t1, reg );
974+ add (t1, t1, index );
979975 addr = addr2;
980976 }
981977
982- if (decrement) {
983- ld (t0, addr);
984- subi (t0, t0, DataLayout::counter_increment);
985- Label L;
986- bltz (t0, L); // skip store if counter underflow
987- sd (t0, addr);
988- bind (L);
989- } else {
990- assert (DataLayout::counter_increment == 1 ,
991- " flow-free idiom only works with 1" );
992- ld (t0, addr);
993- addi (t0, t0, DataLayout::counter_increment);
994- Label L;
995- blez (t0, L); // skip store if counter overflow
996- sd (t0, addr);
997- bind (L);
998- }
978+ ld (t0, addr);
979+ addi (t0, t0, DataLayout::counter_increment);
980+ sd (t0, addr);
999981}
1000982
1001983void InterpreterMacroAssembler::set_mdp_flag_at (Register mdp_in,
0 commit comments