luyahan@plct-c7:~/v8/v8/out/arm64.release$ git diff
diff --git a/src/execution/arm64/simulator-arm64.cc b/src/execution/arm64/simulator-arm64.cc
index ec1cfd9f8eb..327f282bacc 100644
--- a/src/execution/arm64/simulator-arm64.cc
+++ b/src/execution/arm64/simulator-arm64.cc
@@ -425,9 +425,13 @@ void Simulator::Run() {
if (v8_flags.stop_sim_at == 0) {
// Fast version of the dispatch loop without checking whether the simulator
// should be stopping at a particular executed instruction.
+ std::cout << "icount " << icount_for_stop_sim_at_ << std::endl;
while (pc_ != kEndOfSimAddress) {
ExecuteInstruction();
+ icount_for_stop_sim_at_ =
+ base::AddWithWraparound(icount_for_stop_sim_at_, 1);
}
+ std::cout << "icount " << icount_for_stop_sim_at_ << std::endl;
} else {
// v8_flags.stop_sim_at is at the non-default value. Stop in the debugger
// when we reach the particular instruction count.
diff --git a/src/execution/riscv/simulator-riscv.cc b/src/execution/riscv/simulator-riscv.cc
index c01652c5ef2..04550a08013 100644
--- a/src/execution/riscv/simulator-riscv.cc
+++ b/src/execution/riscv/simulator-riscv.cc
@@ -7933,6 +7933,7 @@ void Simulator::Execute() {
// Get the PC to simulate. Cannot use the accessor here as we need the
// raw PC value and not the one used as input to arithmetic instructions.
sreg_t program_counter = get_pc();
+ std::cout << "icount " << icount_ << std::endl;
while (program_counter != end_sim_pc) {
Instruction* instr = reinterpret_cast<Instruction*>(program_counter);
icount_++;
@@ -7945,6 +7946,7 @@ void Simulator::Execute() {
CheckBreakpoints();
program_counter = get_pc();
}
+ std::cout << "icount " << icount_ << std::endl;
}
void Simulator::CallInternal(Address entry) {
luyahan@plct-c7:~/v8/v8/out/arm64.release$