This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
P1
First part of this patch adds missing block end callback for indirect jump instructions.
The
} else if (!TCGV_IS_UNUSED(jr)) {
condition seems to be true when qemu translates jump to virtual register (indirect jumps/calls and even ret instructions).Without this addition, callback was not triggered for such instructions.
P2
Second part tries to address issues with basic block ends being only subset of translation block ends.
Under certain conditions, like too long basic block or popf, sti, invlpg instructions, TB translation is terminated immediately even though basic block didn't end.
There could be some cases missing, but this still saves a lot of time and effort in scripts checking / disassembling
prev_pc
.Alternative: documentation could be updated to reflect, that the callback triggers on translation block end and that basic block end checking can be done through multiple INSN_END_CB callbacks.