Move speculative count check to report more accurate numbers

This commit is contained in:
DataHoarder 2021-01-01 03:52:33 +01:00
parent 81b89b8d11
commit 15690f54fd

View file

@ -234,16 +234,16 @@ void ImageFormat::decodeAnalyzeInstructionsAt(uint32_t offset) {
auto possibleBranches = instruction->execute(state);
if (jumpsUsed.find(state.current) != jumpsUsed.end() && !jumpsUsed[state.current]) {
jumpsUsed.erase(state.current); //Clear to recognize a non-speculative jump
}
if ((instruction->getCommand() == Instruction::Instruction::CommandOp::JUMP ||
instruction->getCommand() == Instruction::Instruction::CommandOp::RETURN) &&
jumpsUsed.find(instruction->getEndAddress()) == jumpsUsed.end()) {
jumpsUsed[instruction->getEndAddress()] = false;
}
if (jumpsUsed.find(state.current) != jumpsUsed.end() && !jumpsUsed[state.current]) {
jumpsUsed.erase(state.current); //Clear to recognize a non-speculative jump
}
if (state.current == 0) {
//std::cout << "EXIT DUE TO END " << std::hex << state.previous << " -> " << std::hex << state.current << "\n";
break;